This article mainly introduces the Perl implementation of high watermark algorithm (to solve the multivalued comparison problem method), from the code examples can also learn to array traversal, function writing, function calls and other knowledge,
Method 1:
The two-day use of MAVEN in building an application, because project is very large, there are more than 700 pom.xml files, and even more depressing is that in many pom.xml files are individually specified in the repository URL, I need to
This article is mainly for PWS and IIS5.0, ASP program in the PWS and IIS5.0 environment are supported, for Apache Server Software configuration This forum has been addressed, not discussed here.
First, PWS configuration ActivePerl, so that PWS
PPM (Programmer ' Package manager) is a graphical management tool with ActivePerl, and with this tool, it is convenient to upgrade, update, and remove the Package from Perl. You can open the graphical interface simply by entering the PPM or ppm GUI.
Definition of a function
A subroutine is a piece of detached code that allows you to reduce duplicate code and the program is readable. In Perl, subroutines can appear anywhere in the program. But usually at the beginning or end of the program.
undef default undefined character, Perl does not have null,defined ($x) function: If the argument is undef return false
QW (CS PHY Geo) is similar to the list of ("CS", "PHY", "GEO") that can be assigned to an array @array
Array operators:
program annotations in Perl: Single-line and multiline comments(i) Single-line Comment:Lines beginning with # are considered by Perl as annotations. But with one exception, the first line of the Perl program begins with a #, and he specifies the
The program calls the remote service, in order to ensure that availability is best done before the use of health testing, the exception of the service excluded.
Copy Code code as follows:
#!/usr/bin/perl
#
Use strict;
Here is an example:
Copy Code code as follows:
Use strict;
#这里是两个数组
My @i = (' 1 ', ' 2 ', ' 3 ');
My @j = (' A ', ' B ', ' C ');
#在进行处理之前, we'll print them out and look at them.Print "In the main program before calling
Question: I now want to add awk ' {print $} ' from_file > To_file to the Perl program, but after adding sytem and ', I can't do it.
Answer: There are a number of commands that can be executed at the command line, but they cannot be executed
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
There is no bool type in PerlThere is no bool type in Perl, and all judgments are made by numeric types and string types.What type is FalseThere are only three scalars, the number 0, the empty string "", and the string ' 0 ' ("0").The vector has an
When you are in a city, across the streets, running for thousands of kilometers, an obvious idea is, how much faster I am than before, how the running volume changes, if you can all the routes in this city to draw out, what will be the scene?
1.
recently, I have been studying in some forums and communities to find out that many people have a lot of bias towards Perl. I've studied Perl for so long, and it's a little bit of experience, so I've summed up the reason why everyone is biased
Use SVG;# New SVGMy $svg = Svg->new (width = 4000,Height = 5000,);# text object, the key is the font type, at first only with ' font ' = ' Arial ', the Web page display font does not look Arial, do not know why. In short, set to ' font-family ',
If you want to call it directly in any directory, You need to configure its corresponding environment variables.
The following describes how to configure environment variables:
1. Java:
Download the JDK and install or decompress it.
Set
1. array concatenation function: splice
Used to insert an element or sublist to a list or array. You can also delete an element or sublist from an array or list, or replace an element or sublist in an array or list; the prototype is as follows:
@
Reprinted from: http://club.topsage.com/thread-464914-1-3.html
Learning Perl
Perl is a very useful language and can be used to do many things. However, it is only a language that has mastered Perl. You only have mastered a small piece of knowledge
What is a closure? "This is a notion Out Of The LISP world that says if you define an anonymous function in a particle lexical context, it pretends to run in that context even when it's called outside of the context. "[2 ]. In the object-oriented
Read documents: http://search.cpan.org /~ After AAS/Digest-MD5-2.39/md5.pm,
Useful chapters:
This is useful when calculating checksum for files:
Use Digest: MD5; my $ file = Shift | "/etc/passwd"; open (file, $ file) or die "can't open '$ File
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