In Perl, Srand () provides random number seeds for use by rand (), and Rand () produces random number generators.If Srand () is not invoked before the first call to Rand (), then the system automatically invokes Srand () for you.Calling Srand ()
Process processing functions
1. Process Start functionFunction name EvalCall Syntax eval (string)The commentary considers a string as a Perl statement execution.When executed correctly, the system variable $@ is an empty string, and if there is an
Perl uses the function rand () and Srand () to provide a basic tool for the generation of random numbers (or, more precisely, "pseudorandom numbers") strings. These functions do not use encryption to provide security, so do not use them to encrypt
Perl Common function set 2
I. Process processing functions1. Process startup FunctionFunction Name evalCall the syntax eval_r (string)The description regards string as a Perl statement execution.After the command is correctly executed, the
list of common system functions
directive : Printsyntax : print FileHandle LISTDescription : This filehandle can be viewed as a bridge between I/O (OUTPUT), which can be used to make data read and write in the FileHandle. StdIn is the
Common Perl Functions
Command: PrintSyntax: Print filehandle listNote: This filehandle can be seen as a bridge between I (input) and O (output). You can use filehandle to read and write data. stdin indicates the connection from which data is input,
List of common system functions
Command: PrintSyntax: Print Filehandle LISTDescription: This Filehandle can be seen as a bridge between I (INPUT) and O (OUTPUT). You can use FILEHANDLE to read and write data. STDIN indicates the connection from
I. Process processing functions
1. Process startup Function
Function Name eval
Call the syntax eval (string)
Describe the stringPerlStatement execution.
After the command is correctly executed, the system variable $ @ is an empty string. If an error
ProgramFile: test. pl
CopyCode The Code is as follows :#! /Bin/perl
# Filename: Test. pl
Use strict;
Use warnings;
# Search for a sequence that is better recognizedMy $ DNA = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ n ";My $
program file: test.pl
Copy Code code as follows:
#!/bin/perl
# filename:test.pl
Use strict;
Use warnings;
#随便找一个比较好识别的序列
My $DNA = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n";
my $i;
My $mutant;
Srand (time|$$);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.