The client serialization object of Perl memcached adopts the nfreeze method of the storable module, which calls the C extended do_store method. The deserialization uses the thaw method of the storable module, this method is the do_retrieve method of
Most of the time, we want to modify the content of the original file. Although the powerful text editing command sed exists in Linux, however, he can only generate new files or print them to the screen (perhaps sed also has the ability to modify the
Transferred from your original blog on yourblog, written on 13:05:48
After reading jackey's "bugzilla installation in Windows", the installation is successful according to the method described in this article. However, jackey does not seem to be
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. Time Function: returns the number of seconds that have elapsed since January 1, January 1, 1970.Use: My $ t = time ();
2. localtime function: Get the local time zoneUse: My $ T = localtime (Time ());
3. gmtime function: Get Greenwich Mean
SeeArticle: Http://space.itpub.net/82392/viewspace-238018
However, some functions cannot be used because they are too old.
# Install PerlYum install-y Perl *
# Install unixodbc### Install the support library as needed### Yum-y install
1 shell echo command will automatically add line breaks
2. $? Accept exit return values
3. The variable is equal to 'execute script', and the obtained value of the variable is the value output from the script to stdout.
Example:
1. Perl
Code: Http: /xxxxx/cgi/perl-cgi.cgi? Name = itech & url = itech.cnblogs.com & p1 = test1
#
! /Usr/bin/perl-WT# Shoshould use strict and warnning
Use Warnings;
Use Strict;
Use CGI;
#
To debug Error
Use CGI: carp QW
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
1) The 3 methods for reading files are read by row and saved to the scalar while () {print;} Read by row, and saved to the array @ array = ; read the entire file and store the scalar $ string = do {local $/; ;}; 2) read the file instance open (Ep,
Install your own Perl modules. If you do not have the root permission, install Perl modules in your home directory.
From: http://servers.digitaldaze.com/extensions/perl/modules.html Installing perl5 modules locally
Normally, the perl5 module
Generally, regular expressions are for single-line text. Since Perl can process strings of any length, the Perl mode can easily match multiple lines of text, just like a single line of text. Of course, the expression should contain multiple lines of
Three Regular ExpressionsCommon pattern in Regular Expressions 8 principles of Regular Expressions
Regular Expressions are a special feature of the Perl language and also PerlProgramBut if you can master it well, you can easily use regular
Preface
According to the Perl Language Reference Manual, Perl isPractical Extraction and Report Language(Practical report extraction LanguageIt is designed by Larry Wall and constantly updated and maintained for programming in UNIX environments.
Sort by requirements:
Copy codeThe Code is as follows :#! /Bin/perl
@ Number = qw/5 10 15 3 2 4 8 6 /;My @ descending = sort {$ a $ B} @ number; # Here $ a = 5, $ B = 10, because $ a is in front, the result of perl is that the decimal places
The pop operation extracts the last element of the array and returns the result:
@ Array = 5 .. 9;$ Fred = pop (@ array); # $ fred gets 9, @ array is (,) now)$ Barney = pop @ array; # $ barneygets8, @ array is (5, 6, 7)Pop @ array; # @ array: (5, 6)
A routines call in CGI. pm
1. CGI. pm implements two usage methods: Object-oriented method and traditional perlmodule method.Object-Oriented Approach:
Copy codeThe Code is as follows :#! /Usr/local/bin/perl-w
Use CGI; # load CGI routines
$ Q = CGI->
Here are two examples for your reference.
Record the function running time for any function.
Copy codeThe Code is as follows :#! /Usr/bin/perl
Use warnings;
Use strict;
No strict "refs ";
Sub testLogToStd {
Print "Test stdout: \ n ";
Open LOG, ">
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