This article discusses the ability of developers to write POP3 e-mail applications with Perl-specific capabilities.
Email clients such as Microsoft Outlook and Mozilla Thunderbird (Thunderbird) can make email very easy--most of the time you just
"." to match wildcard characters for any one character, except for "\ n" line breaks
"*" is used to match previous entries 0 or more times
"+" is used to match previous entries appearing more than once
"?" to match one or more occurrences of the
Use base is object-oriented programming, used to describe the "base class", in fact, plainly,Use base somemodule;is equivalent to a combination of the following two sentences:begin{Use Somemodule ();Push @ISA, QW (Somemodule);}You can also use base
Introduction: This is a detailed page of pattern modifiers-Rule expression modifier. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: //
There are several prompt variables to mention when the color of the terminal is mentioned under the shell:
PS1: The default prompt, that is, after the remote boarding system, open the terminal, we see the familiar prompt every day;
[Root@vps ~]
OSX and most Linux distributions have built-in Python, Perl, Ruby and other programming language environments. it is a good thing for developers and common users. developers have many choices when writing programs, there is no need to worry about
Use Regular Expressions
Take two steps:Remove the preceding: $ A = ~ S/^ + //;
Remove the following: $ A = ~ S/+ $ //;
One step:
S/(^ s + | S + $) // G;
Delete the line break at the end of the string:
The chomp function usually
The inheritance of Perl classes (packages) is implemented through the @ ISA array. In short, Perl regards it as a special array of directory names, similar to the @ INC array (the @ INC array contains a reference path ). When Perl cannot find the
(1) single line comment:
All rows starting with # are considered as comments by Perl.. But there isExceptionsThe first line of the Perl program starts with #. It specifies the interpreter of the Perl program.
Example: # print 1;
(2)
I often need to extract a large amount of web page data (more than 1500 pages). I have tried many methods and can achieve this, but the efficiency is not too high.
At the beginning, lwp: simple (get) is used to download and extract data in sequence.
1. delimiters
= ~ M/there /;
= ~ S/there/here /;
There are also types of delimiters:
= ~ /There/
= ~ M # there #;
= ~ S # there # here #;
= ~ M (there );
= ~ S (there) (here );
= ~ M {there };
= ~ S {there} {here };
= ~ M [there];
= ~ S [there]
$-Number of printable lines on the current page, part of the perl format system $! Return Error code or error String Based on the context content $ "list separator $ # default digital output format when printing numbers $ process ID of the perl
1) grep function grep has two expressions: grep block listgrep expr, listblock represents a code block, usually represented by {}; expr represents an expression, usually a regular expression. In the original article, expr is anything, including one
I haven't posted it for a long time. Today I am posting about the common functions of the lwp module.
(1) The most important function is to view the webpage source file. We can view the webpage source file through the existing methods of Perl, and
"Our"," The name is limited to a certain range ", in fact, is to clearly declare a" global variable ", although defined in a module or function, can be accessed outside, if it has already been declared, use "our" again to indicate that the global
Even if the strict and warnings options are enabled, the following code does not have errors or warnings.
Copy codeThe Code is as follows :#! /Usr/bin/perl
Use strict;
Use warnings;
Sub test {
$ A = 1;
$ B = 2;
Print $ a, "\ n ";
Print $ B, "
Chomp is used to delete line breaks.
Copy codeThe Code is as follows :#! /Usr/bin/perl
$ C = "abcde ";
Chomp ($ c );
Print "$ c \ n ";
[Root @ ak] # perl a. pl
Abcde
Chop is used to delete the last character.
Copy codeThe Code is as follows :#!
At the beginning, I plan to use perldoc to view the Apache2: Request module. The following error occurs during running:
Copy codeThe Code is as follows: Error in tempfile () using/tmp/XXXXXXXXXX: parent directory (./) is
Not writable
The <> operators in perl can be used as follows:
1) if the angle bracket contains a file handle, the angle bracket operator allows you to read the file handle, such as .2) If the angle brackets are in the search mode, the angle brackets operator
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.