Sort Function Sort list Sort Block List Sort subname list The usage of sort is as follows. It sorts the list and returns the sorted list. If the subname or block is ignored, sort is performed in the standard string comparison order (for example,
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
Http://developer.51cto.com/art/201007/213719.htm
Http://www.ibm.com/developerworks/cn/linux/sdk/perl/culture-4/index.html
Http://www.sdsc.edu /~ Moreland/courses/introperl/docs/manual/pod/perldebug.html # Name
The default Perl debugger is
1. Since each Hash has a private iterator (iterator), the loop using each can be nested, because different hashThere are different iterator. Although this is just a footer, we should also tell you that you can use keys or valuesFunction, reset the
The current project has just completed the compilation link of all components, and it is okay to run it.
However, you have to double-click six programs (four window programs and two command line programs) each time you run the program ).
I just want
1. the array name can be the same as the scalar name. // if you are not afraid of being dizzy, use it =. =2. The array is out of bounds only when the value is UNDEF.3. underline only serves to divide long numbers4. The index value of the last
Use regular expressions to process files
1. S //, S/ABC/Fred/first matches ABC. If ABC is matched, use Fred to replace ABC. If ABC is not matched, do nothing.
2. S // G, replace globally, S/ABC/Fred/g, replace all ABC with Fred
3. Other symbols can
1. Unless statement, if is executed when the condition is true, unless is executed when the condition is false
2. abbreviation statement. & error ("invalid input") Unless & valid ($ input); $ I * = 2 unitl $ I> $ J; print "", ($ n + = 2) while $ n
3
1. chdir change the working directory... chdir "/etc" or die "cannot chdir to/etc: $! "; If the parameter is null, change it to the main directory.
2. My @ all_files = glob "*"; my @ bz_file = glob "*. bz2"; only
3. My @ all_files = ; my $ dir =
# Recently, I experienced Notes crash problems several times. # It wasted me a lot of time to terminate Notes completely and then restart it, # so I wrote this Perl script to save myself. Also hope it's helpful to you when you read these comments #
Perl generally has three methods to define a variable: 1. $ Var = "XXX" 2. local ($ var) = "XXX" 3. my ($ var) = "XXX" the first method is to define a global variable, the second method is to define a local variable, and the third method is to
#! /Usr/bin/perl# Un-mangle C ++ symbol# Assuming the C ++ filt command is available
Use strict;Use warnings;
If ($ # argv! = 0 ){Print "Usage: \ n ";Print "program filename \ n ";}
My $ in_filename = $ argv [0];Open (my $ in, "
$/= UNDEF;My $ body =
For DBAs, an accurate and stable monitoring system is nothing more than a powerful sword. If hundreds of systems rely on manual checks every day, the workload is too heavy to imagine, and the human cannot capture errors in real time.
However, with
Author: belltoy | statement: reprinted. The original address and author information and copyright statement must be indicated in hyperlink form during reprinting.
Web: http://www.belltoy.net/send-mail-with-perl.html
It's boring to sign in emails
Generally, Web sites include many services and applications. We cannot know whether the system is running normally in real time, especially when the server goes down or the application goes down at night, will affect the business andDuring user
#! /Usr/bin/perl
Use warnings;
Use strict;
My $ flag = 0;My $;While ()
{If (/^> /){$ Flag = 1;$ A = 0;}If ($ flag){Print $ _;$ A ++;}If ($ A = 3){$ Flag = 0;}}############! /Usr/bin/perl-WUse strict;Open (logout, "> out. log") or die "can't create "
Perl counts the number of occurrences of specific characters in a stringI recently found some related skills from the Internet when I encountered a problem in programming, as follows:(The array and hash methods are no longer listed)Method 1:
#!/usr/
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.