wget http://www.cpan.org/src/5.0/perl-5.20. 1. Tar. -xzf perl-5.20. 1. Tar. gzcd Perl-5.20. 1./configure-des-dprefix=$HOME/localperlmakemake testmake InstallView CodeThis process takes about more than 10 minutesEdit the first Perl
Eighth chapter: Built-in function 0 nine-Qi.do not recalculate the sort key in sort. 0 Jiu Ba.use reverse to reverse the list. 0 Jiu Jiu.use scalar reverse to reverse the scalar. 00.use unpack to remove fixed-width fields. one 0.use Split to remove
#安装:sudo perl-mcpan-e shellInstall Term::P Rogressbar#场景: Suppose that there are 200 URLs need crawlers, each URL crawl speed is not the same, the completion of the 第1-2个 URL crawler completed, the progress bar shows 1%. Of course the count of the
#! /usr/bin/perlUse GETOPT::STD;Use warnings;Use strict;Sub Read_from_sh ($) {my $file = shift;My @files = ();Open F, $file or die "Could not open $file: $!";while () {Next if/^\s*$/;Push @files, $_;}Close F or die "Could not close $file: $!";return
The principle is to do something first before calling a method, such as checking the parameter or something. This keyword is also available in the dancer. When the request arrives, it can pass the check The remote IP address is used to determine
Labels: styles use different files for the Learning Program 1. in Perl, the subprogram name and variable name are different namespaces. You can use the same name to name subprograms and variables respectively. However, we do not recommend that you
tag: OS data art for Re C #! /Usr/bin/perl # Name: logcalc. PL # calc The amount of access urluse strict; Use warnings; Use diagnostics; Use File: basename; my ($ Arg, $ arg_only); my $ file; my ($ year, $ month, $ day, $ Mon); my ($ time, $ method,
1. What is Perl?
Perl is short for Practical Extraction and report language. It is designed and maintained by Larry Wall and is used for programming in UNIX environments.
. Perl has the power and flexibility of advanced languages (such as C. In fact,
Perl starts to use utf8 encoding internally to represent characters starting from 5.6. That is to say, there should be no problem in processing Chinese characters and other language characters. We only need to make good use of the encode module to
# Determine whether a variable matches an empty string, M! Pattern! And M/pattern/If ($ STR = ~ M! ^ \ S * $ !)If only the string is null, you can use if ($ str eq "")# Determine whether the $ Doc variable matches the given mode. The mode string
I recently worked as an intern and watched my company write some scripts in Perl. I heard that Perl is still very powerful in text processing. I scanned this book on weekends ~ Recorded ~
UNDEF has no Defined Characters by default, and Perl does
Before the source code, there is no secret, directly on the source code:
If (@ argv! = 2 ){Die "Usage: $0 sample_file sample_number \ n ";
}
My ($ sample_file, $ sample_number) = @ argv;
Open my $ file, "My @ content = ;
My $ all_number = @ content;
The "Perl 5 to 6 translated version" issued in this post for three consecutive weeks has been completed. Thanks to the support of Py (ask him if he cannot understand English in many places ). if there is something wrong with the translation, please
Why should I use references in Perl?
For developers familiar with C language, the pointer concept is certainly not unfamiliar.
Perl references pointer, which can point to variables, arrays, hash tables, and even subprograms.
The two Perl reference
1. Conditional Control statements
If (conditional expression)
{
# Statement
}
Else
{
# Statement
}
Given... The when structure is as follows:
Given (scalar)
When (){}
When (){}
When (){}
When (){}
The given statement is used as
As a scripting language, Perl is a powerful tool for system management. Proficient in Perl can greatly improve work efficiency. Therefore, no matter whether it is specialized as a Perl programmer or not, it depends on whether it is popular or not!
How to debug in Perl ?, Debugperl
If it is a small program, you can use this way:
C: \ Rebecca \ script \ perl>Perl-d calculate. pl
Loading DB routines from perl5db. pl version 1.39 _ 10
Editor support available.
Enter h or 'H H' for help, or '
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service