Let's take a look at our usage.
Require 5.006When the version number is less than 5.006, the failure is returned, causing the module to fail to load.So its role is to ensure that the module invokes the Perl version of the environment.
Our, like my,
Original address: HTTP://BLOGREAD.CN/IT/ARTICLE/743?F=WB
Some monitoring scripts are written in Perl and are scheduled for execution in Crontab. Sometimes it is found that a script runs too long and runs multiple instances at the same time, so it
#!/usr/bin/perl-wUse net::ftp;Use strict;My $server = ' IP address ';My $user = ' user name ';My $pw = ' password ';
My $ftp = Net::ftp->new ($server);
$ftp->login ($user, $PW) or die "login failed!/n";Print "Login ok! Starting list files on $server
#!/usr/bin/perl-w
@lines = ' Perdoc-u-fatan2 '; Don't confuse anti-quotes with single quotes
foreach (@lines)
{
s/\w}+) >/\U$1/g;
Print
#print "Hello, world!\n"
}
Scalar is the simplest data type in Perl.
For most scalars, it is either a number
1.PERL4 Kinds of variablesScalar: $ pure variable, scalarArray: @Hash:%File: Uppercase2. Variable composition1. Naming rules case sensitive, alphanumeric underline ...2. No keywords, $+ other, but can not conflict with built-in variables.3. The name
About sleep functions in Perl
Sleep exprSleepThis function allows the script to sleep for expr seconds. If there is no expr, it will be permanently sleep and will return sleepNumber of seconds. You can send a sigalrm Method to the process to
This is the second part after ABC Perl programming. This is because of a book called Higher Order Perl. The author of this book mentioned many
ProgramMembers are using Perl to write C Programs. This is unfortunate. Of course, the so-called experts
1. Use the grep Function
Function Name grepCall the syntax @ foundlist = grep (pattern, @ searchlist );Similar to the Unix search tool with the same name, the grep function extracts elements that match the specified pattern in the list. The
Perl is context-related and different from many other languages. The interpretation of values in Perl sometimes depends on the context of the operation or value. The context includes numbers, strings, lists, and flags. There are two common
I haven't written a Perl script for a long time. Recently, my computer has the prison break audio and SRT lyrics. However, the lyrics are incorrect. After the script is processed, you can change your voice to subtitles. It is mainly used to review
The use base is used to describe the "base class" in Object-Oriented Programming. To put it bluntly,
Use base somemodule;It is equivalent to the combination of the following two sentences:
Begin {Use somemodule ();Push @ Isa, QW (somemodule );}You
Document directory
2007-03-22
Use the Perl configuration 2007-03-22tag in Genesis:
Copyright Disclaimer: During reprinting, please use hyperlinks to indicate the original source and author information of the article and this
There are a lot of logs, You need to count the number of return codes in the log records of each device by device.
The device name can be obtained based on the file name. The log records are in a certain format. The seventh field is the return code.
Posted on Netease blog 21:18:43
Start learning Perl.
(What interests me about Perl is the little alpaca book. Er, this is the alpaca, but how does it feel like a god beast on the Internet .)
2.1-2.3 Calculation of circle radius
#! Perl-W$ Pi = 3.1415
1. Task
To implement some mechanical word segmentation algorithms, we prepare to use the word segmentation vocabulary of the "National Language Commission corpus". The word segmentation file downloaded online is an Excel file. The task in this
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.