In this article we learned how to sort strings or arrays of numbers in Perl.
Perl has a built-in function called sort. There is no doubt that you can sort an array. The simplest form is to pass an array that returns an array of sorted elements.
Although it is recommended that you turn on warnings in every Perl script and module, you do not want users to see a warning from Perl.
On the one hand you want to use using warnings as your safety net in front of the code, on the other hand,
CPAN (Comprehensive Perl Archive Network: A comprehensive Perl archive network) is the central repository for any Perl-related stuff. It contains the wisdom gathered from the entire Perl community: Hundreds of Perl modules and scripts, the
Environment for WinDOS, two points to note:
1, the default ActivePerl under the code is GBK, so you need to convert the string to GBK will not display garbled2, to traverse the file directory, you need to exclude a special directory.
Complete code:
Here first introduces the next Nali this open source applet, project address: http://code.google.com/p/qqwry/
Here's a description of the website from the project's owner:
Copy Code code as follows:
Download
nali-0.2.tar.gz–2011-09
Recently wrote a program to download the attachments from Gmail in bulk, using Mail::P op3client and MIME::P arser 2 Modules
Implementation code:
Copy Code code as follows:
Use Mail::P op3client;
Use MIME::P arser;
My $U = '
1, the Linux system generally with PerlCan run the program in:/usr/bin/perl
2. Perl Test Procedure
Copy Code code as follows:
#!/usr/bin/perl-w
Use warnings;
Print "Hello, Perl works! ";
Named test.pl
Under the terminal,
Special variable of regular expression
1, $n: The nth substring containing the last pattern match2, $&: Previous successful pattern matching string3, $ ': previous match successful substring before4, $ ': After the substring of the previous match
Introduction to the Perl language instructions for a scalar scalar constant numeric string number and string conversion scalar variable Print output result comparison operator get user input undef value scalar context two list array list arrays note
Installing Perl's expansion pack under Ubuntu is simple, just a simple step.sudo cpancpan> install Bundle::cpanplus::D ependenciescpan> Install Bundle::cpanplusThe whole process will take some time. When the installation is complete, you can then
Link: http://pan.baidu.com/s/1c0fjY3e Password: j8peThe files in the network disk are my profile, and the Lisp source package used. After downloading, it can be extracted to the user's home directory.The contents of my Emacs configuration file are:#
A) Sort function usageSort LISTSort BLOCK LISTSort SubName LISTThe use of sort is in the form of 3. It sorts the list and returns the sorted lists. If the subname or Block,sort are ignored in the order of standard string comparisons (for example,
The hash data structure in Perl.A hash is a data structure that consists of a pair of keys-values pairs.These keys and values are arbitrary scalars, but the keys are always converted to strings and must be unique strings.Access to the hash element, $
Call the Perl subroutine in VCAuthor: Source: ZZ published on: Views: 2691 font size: large medium small
As needed, you need to call the Perl subroutine in VC to process the file. You can run it after reading the Perl instruction document for a long
Go to non-securityPython
Http://www.nohack.cn/bbs/dispbbs.asp? Boardid = 13id = 551 page = 1
Using NC connection, you can use simple pipeline commands ('') to execute basic system commands. If you are interested, you can add, modify, and make more
Example:
Copy codeThe Code is as follows :#! /Bin/perl
Print "Please input an string and a number by order! \ N ";
$ The_string = <>;
$ The_numb = <>;
Print "The result is \ n ";
Print "$ the_string" x "$ the_numb ";
Result:The result
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