programs are split into multiple parts, each of which typically contains one or more sub-programs and related variables that perform a specific task or multiple tasks. Parts that assemble variables and subroutines are called program modules.1. Create a moduleIn Perl 5, you create a module with packages by creating a package and having it in a file with the same name. For example, a package named Mymodult i
A brief description of http://www.perldoc.com/perl5.6/pod/perlmodlib.html for some common modules
Use modules in Perl:Module: http://www.cpan.org/modules/01modules.index.htmlInstallation module:1. Perl makefile. pl2. Make3. Make Test4. Make installYou can also run the following command to install the module (the applic
Author: mellonfire2006-05-12 10:10:26
You may already know that there are many existing Perl modules on the Perl integrated collection network (Comprehensive Perl archive network, CPAN), allowing developers to efficiently complete common tasks.
Article Title: how to install Perl and Its modules in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Both Linux and perl are free software. It is amazing to combine them. Follow these steps to install
This article mainly introduces the differences between the PHP extension modules Pecl, Pear, and Perl. For more information, see
I. brief summary:Pear: a relatively standard for writing, a popular toolbox code set in foreign countries
Pecl: php extension package, but not included in the basic extension scope of php
Perl: a scripting language that appeared earlier
This article mainly introduces the differences between the PHP extension modules Pecl, Pear, and Perl. For more information, see
This article mainly introduces the differences between the PHP extension modules Pecl, Pear, and Perl. For more information, see
I. Brief summary:Pear: A relatively standard for writin
The ability to manipulate dates and times is fundamental to most programming languages, and Perl is no exception. But when it comes to more complex processing of time, Perl's own features often seem powerless. In this case, it's a good idea to take a look at the Perl comprehensive Collection Network (CPAN), which has a lot of Perl
Method one, manual installation steps
Download the DBI Module version 1.13 of the compressed file dbi-1.13.tar.gz from CPAN, assuming it is under/usr/local/src/.Cd/usr/local/srcUnzip this file:Tar xvzf dbi-1.13.tar.gzA new DBI-1.13 directory is created.CD DBI-1.13
Generate Makefile:Perl makefile.plBuilding a moduleMakeTest moduleMake TestIf the test results report "All test OK", you can safely install the compiled module. Before you install a module, you must firstMake sure that you have wri
In Perl development, it is very likely that some files in different formats, such as XML, PDF, CSV, and RSS files, are different from some binary data formats. Perl applications need to operate on these files to read and write them.
In this case, you can turn to the Perl archive network (CPAN) to simplify file operations. CPAN has a large number of
Add the methods summarized yesterday to query which Perl modules have been installed locally. You can use either of the following methods:
Run the following statement in shell:
$ Perl-msmart: comments-El
If an error similar to the following is prompted, can't locate smart/comments. pm IN @ INC (@ INC contains: C:/strawberry/
The contents of the Perl Archive Network (CPAN) of Windows-specific Perl modules can be satisfying for many people. Windows users like it because it allows users to efficiently and quickly carry out fairly complex work in a Windows development environment. Open source programmers like it because Perl has super compatib
Webmin is a very powerful Linux system management panel. So that you can add the user account through the browser, manage apache,dns,mysql and so on various functions. Webmin is a development based on the Perl language panel, using Webmin management Linux server, you can visualize the management of your server, from the command line mode of management methods. Most importantly, it is a free panel.
How to install Webmin, refer to this: Use Webmin to ma
Recently I used Perl to write a lot of automated testing tools. I have used some modules and I think it is quite good to record them. I may need to use them in the future.
Smart: CommentsSmart comments provides debugging and tracingCodeYou can print a variable value or trace and display the progress of a loop.The most ingenious thing is that when you finishProgramWhen you do not need the debugging code,
1 UseLWP::Simple ;2 UseHtml::Linkextor;3 4 $html= Get ("http://www.baidu.com");5 $link= Html::linkextor->new (\check);6 $link->parse ($html);7 8 Subcheck{9($tag,%links) =@_;Ten Print "$tag \ n"; One foreach $key(Keys %links){ A Print "$key $links {$key}\n"; - } - } the - #$tag for tag types such as a, link, img, script, etc. - #%links is the hash type, the key is the link name, the value is the link value - #比如对于a标签, the key in links is href, and the value is the link name
I. DBI InstallationWget http://www.cpan.org/modules/by-module/DBD/DBI-1.604.tar.gzTar-zxvf DBI-1.604.tar.gzCD DBI-1.604Perl makefile. plMakeMake TestMake install
Ii. DBD InstallationYum-y intallMysql-develNote the MySQL environment variables. If not, add/usr/binl/MySQL to the environment variable path.Path/usr/binl/MySQL: $ path;
Export path(Fill in the installation path of MySQL according to the actual situation)
Wget http://www.cpan.org/
A brief summary:Pear: A written comparison specification, a foreign popular Toolbox code setpecl:php expansion pack, but does not belong to PHP basic extension scopePerl: A script-level language older than PHP that PHP borrowed from his regular expression section
Two, Pear, Pecl are the collection of PHP expansion modules. is to expand PHP two ways:
A. One is to write functions and classes in pure PHP code.Pear is such a project. Pear is the officia
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 module name, such as I want to install Lwp::useragent::P roxyany
Input install Lwp::useragent::P Roxyany, but often there are mistakes, this way is very troublesome.
Compared with Perl, Perl is still relatively small. It is quite convenient to watch videos when getting started, just like watching movies. I have read almost every episode of Superor. I hope you can take a closer look.
Note: You need to write more during learning. You can only understand that only 5% of your work is yours. If you do all the exercises, 30% of your work will be yours. If you can write your
pass an array or a hash class.
Array:
Copy Code code as follows:
My @testArray = (1, 3, 2);
#In Sub Sub Processarraybyreference ($) {
my $arrayref = shift;
My @array = @ $arrayref;
#...
}
#In Sub Processarray:sub processarraybyvalue ($) {
my @array = @_;
#...
}
Processarraybyvalue (@testArray);Processarraybyreference (\ @testArray);
HA series:
Copy Code code as follows:
Sub Printhash ($) {
My%hash =%{shift ()};
For my $k
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.