Soket is a network socket. It is a combination of IP addresses and port numbers. The socket module is required to use sockets in Perl. It can be used after testing: The following example is used for illustration: Server: #! /Usr/bin/perl-WUse
# Enable the Perl program to support utf8 wide character encoding. If you do not add the following lines to print Chinese characters, the wide character in print warning or error will appear.Use utf8;Binmode (stdin, ': encoding (utf8 )');Binmode
The following two commands can be used to check insecure syntax in Perl programming: #! /Usr/bin/perl-W Or: Use warnings; Although both of them can prompt insecure syntax, there is still a difference. The Perl help documentation writes:
How to Use Perl scripts to operate system environment variables?
Presumably many of my friends will immediately think of the special hash variable $ ENV provided in Perl. Right, some system variables can be obtained in $ ENV. How can this problem
1. Open and Close files
The syntax is open (filevar, filename), where filevar is the file handle, or is
Program Is used to represent the code of a file. filename is the file name, and its path can be relative or absolute.
Open (file1, "file1
Introduction to regular expressions in Perl
I. IntroductionIi. Matching Operators3. Special characters in the Mode1. Character +2. characters [] and [^]3. characters * and?4. escape characters5. match any letter or number6. Anchor Mode7. replace
1. When chomp does not have a parameter, use the default parameter to operate on $.
2. array @ array .. can be referenced by $ array [number. $ # Array... indicates the number of indexes in the array.
3. $! Contains error information;
4. By default,
Configure the CGI Development Environment Based on tomcat7.0. The steps are as follows:
Take my tomcat 7 installation directory as an example: tomca_home =/users/Yangxin/documents/devtoos/Java/Apache-Tomcat-7.0.39
1. Open tomca_home/CONF/Web.
Install the cache: memcahced Module
First install and configure CPAN, and use CPAN to install the cache: memcahced Module
Yum-y install CPAN
Vim/usr/share/perl5/CPAN/config. PM
Set the image path:
'Urllist' => [Q [http://mirrors.ustc.edu.cn/cpan/
Perl built-in Variables$-Number of printable lines on the current page, part of the perl format system$! Returns the error code or string based on the context content.$ "List Separator$ # Default digital output format when printing numbers$ Perl
1. Perl
Practical Extraction and report language: Practical excerpt and Report Language
2. Multi-line comment
(1) = requires top level writing
= Description
Statement;
= Cut
(2) The description at the end must be written in the top level.
Print
When processing text, we often encounter the following situation: we need to compare the two lines of text and then output them selectively. By default, only one row can be read at a time in the while () {do something} block. Here, I will give a
1. do:
1) form:Do 'filename ';Note:Here, single quotes must be added to filename; otherwise, an error will occur;Filename can be any suffix or even has no suffix. Do not ask for pl or pm.
2) do:Do 'filename'First, you must read the filename file.
There is a text file with multiple lines as follows, and the quantity is not fixed.Lif (_ amscript_cd ("www.jb51.net") {__ amscript_wc ('# closead {display: none ;}');};Lif (_ amscript_cd ("www.jb51.net") {__ amscript_wc ('# footer_win {display:
Perl uses the functions rand () and srand () to generate random numbers (more specifically, pseudo-random numbers. These functions do not use encryption to provide security, so do not use them to encrypt your financial information. However, if you
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!
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.