When you send a command line to the system shell, the shell creates a process to execute the command. The new process becomes a child of the shell, and its execution does not depend on the shell but coordinates with the shell.
Similarly, a Perl
First, let's look at three basic definitions of Perl object-oriented programming:
1. An "object" refers to a simple reference that "there is a way to know which class it belongs to". (object is reference variable)2. A "class" refers to a simple
Sometimes when we deploy a script, we want to know how our program is performing, and we want to get the results of execution, so we can rest assured that a lot of it is good to be able to send me a message when the program succeeds or fails.
In
Not everything in the Perl community is posted on CPAN. There is even a module::thirdparty module that records the list of these CPAN Perl projects. One of the most famous should be the movable Type of blogging and the smokeping of monitoring.
But
One, example one
#!/usr/bin/perl
print "What ' s your name?";
Chomp ($name = );
Print "Welcome, $name, are you ready learn Perl now?"
Chomp ($response = );
if ($response eq "yes" or $response eq "y") {
print "great!
Functions (subroutines):The function brackets in Perl can be written or not, unless the implications are not written.Customizing the subroutine:Sub function-name{Expressions}The return value of the subroutine:All Perl subroutines have return values,
I've written a similar blog before: http://blog.csdn.net/three_man/article/details/34084361Take it out today and take a good look at it:1. Construct an array containing duplicate elementsmy@arr1 = (110);my@arr2 = (515);# join multi arraymy@arr =
Download the Perl compiler. : http://pan.baidu.com/s/1i3GLKApDownload the file as shown in.
Installation of Perl.Directly double-click to run the downloaded file, first there will be a Perl version and so on information, ignore, directly next will
1. First install the Perl environment under WindowsUse Active Perl here, choose the latest version 5.16.1:Http://www.activestate.com/activeperl/downloadsFilename:Activeperl-5.16.1.1601-mswin32-x86-296175.msiInstallation can2. Install the MyEclipse
Source:Http://www.cnblogs.com/itech/archive/2012/08/21/2649580.htmlPerl Object Oriented first let's look at three basic definitions of Perl object-oriented Programming: 1. An "object" refers to a simple reference that "has a way of knowing which
Source:Use of the map function of Perl:GrammarMap EXPR, LIST of which there is,Map BLOCK LIST None of this,Define and useExecutes expr or block on each element in the list, returning a new list. For each of these iterations, the values of the
Perl as a text processing language, will naturally have his recursive writing, the younger brother here to share two examples, I hope to be useful to everyone!Factorial (most classic recursion)#!/usr/bin/perl-s my $Result = 1;sub getresult{my $num =
Question: How do I separate the path, file name, and file suffix of a file?Solution: Perl-file:basename ModuleDescription: In Perl scripts, three commonly used functions can be called after using the Use File::basename module: Fileparse, basename,
Because there is a project in the work that needs to crawl the content of a third-party site, a simple crawler is written under Linux using Perl.Related tools1. httpwatch/Browser Developer ToolsIn general, this tool is not available, but if you find
File: The Basename module is used to extract the directory, File name, And Suffix in the File path.
This example shows how to obtain the suffixes of all files in/home/topgkw. The directory returns a null value.
For detailed usage of this module,
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
1. linux generally comes with perlYou can run the program in:/usr/bin/perl
2. perl Testing Program
Copy codeThe Code is as follows :#! /Usr/bin/perl-w
Use warnings;
Print "Hello, Perl works! ";
Name it test. pl.
Locate the directory in the terminal.
List of common system functions
Command: PrintSyntax: Print Filehandle LISTDescription: This Filehandle can be seen as a bridge between I (INPUT) and O (OUTPUT). You can use FILEHANDLE to read and write data. STDIN indicates the connection from
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.