Type of statement
A computer is a tool that has the advantage of performing repetitive tasks. Loop execution, loop statement.Need to make a lot of judgments, conditionally executed, conditional statements.Sequential statements.Summary of True and
Often encounter downloaded files or e-books, the name contains a number of web site information, the actual use because the name is too long inconvenient, the following script uses regular expressions to rename all the files under the directory:For
Part II network Programming with Perl
1 Input/output Basics
1.1 Filehandles
Filehandles are the foundation of networked applications. In this section we review the ins and outs of Filehandles. Even if you are a experienced Perl programmer, you
[ORACLE@YYJK esb]$ cat a1.pl use DBI;
Use HTTP::D ate qw (time2iso str2time time2iso time2isoz);
Use NET::SMTP;
Use Encode;
My $dbName = ' esbdb ';
My $dbUser = ' esbdata ';
My $dbUserPass = ' esbdata ';
My $dbh = Dbi->connect
In other forums, a lot of the installation of Perl modules, in fact, sometimes very easy to install failure.
Especially on Windows, such as tools such as cpan,ppm can be used. At the command line
Enter CPAN, eject cpan>, and then enter install
Summarize some of the uses of list and array operations in Perl
Suppose you define an array variable @arr and assign the list (str_a, Str_b, Str_c, str_d) to the array @arr
@arr = (str_a, Str_b, Str_c, str_d);
Assign the number of elements in an
Setting environment variablesExport perl5lib=:/redhat/perl/lib64/perl5Installing DBItar -xzvf dbi-1.631. Tar . GZCD DBI-1.631perl makefile.pl prefix=/redhat/perl make make Test Make InstallInstalling DBDtar -xzvf dbd-sybase-1.15. Tar
With regard to the multi-process of Perl, you may soon think of parallel::forkmanager this module. But today we try to write a similar frame ourselves:)This multi-process development model LIGHTTPD from the Open Source server framework, the core
First, install the ActivePerl, the installation process to automatically add the PATH environment variable, so that after installation, you do not need to manually modify the PATH environment variable;Bring up the command-line window via cmd, enter
This pack, unpack in "Perl language programming" has introducedIt looks complicated.1 #Convert A string to a hexadecimal format2 my $source='ABCD';3 Unpack('h*',$source);4 #Note that this ' H ' is a description converted to 16 binary, followed by an
The LWP (short for ' Library for World Wide Web in Perl') is a block group of modules that are used to obtain network data. "Lwp::simple" by calling the Get ($url) function, you can get the content of the relevant URL. If no error occurs, the Get
The I am using is PAR Packer.1. Downloadmodule PAR Packer:http://search.cpan.org/~rschupp/PAR-Packer-1.024/lib/PAR/Packer.pm2. Installpar Packer:2.1 unzipthe *.tar2.2 Go tothe directory and run "Perl makefile,pl", if you is using Active Perl, you
1. arrays and hash variables in parameters:
When defining the parameter list, there are two ways to define an array or hash variable as the input parameter:
1. Add the Backslash "/" before the type name of the array or hash variable.
2. Place
Sending a script a few days ago is very slow. Using Time can only know the total time, but cannot confirm the reason. We found that devel: nytprof is a very good tool.
If you have the root permission, then:
Perl-mcpan-e Shell> Installjson: Any)>
Perl ref Functions
We all know that Perl has a reference concept: a group of data is actually a reference of another group of data. These references are called pointers. The first group of data stores the header address of the second group of data.
Document directory
1. The variable type is determined by the symbol above it
2. There is no need to declare a variable in advance
3. No type conversion
4. No character type
5./Not division
6. Let's talk about arrays.
8. No struct or union
9
Document directory
MySciprt. pl (an example using MyModule)
Zz from http://fanqiang.chinaunix.net/program/perl/2005-06-28/3349.shtml
Do you think the module documentation in perl is difficult? Okay, here is the simplest module in the world.
Http://www.mdbbs.org/thread-28471-1-1.html This is a reference method when I learn Perl, I feel very good, share with you:
Each person has different learning methods. The following are some examples for your reference.
If Perl is the first
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.