Perl as an explanatory language, is very popular with the system administrators, the benefits of not much to say, the disadvantages of many, such as the support of the thread has been not good, so most of the time, we need a number of processes to
'), System, and exec in Perl
In Perl, the check mark (''), system, and exec are used to execute the command order. This article will show us how they are used, approached, and differentiated.
I. utilization methods
1. check mark ('')
First of all,
Process processing functions
1. Process Start functionFunction name EvalCall Syntax eval (string)The commentary considers a string as a Perl statement execution.When executed correctly, the system variable $@ is an empty string, and if there is an
Perl Common function set 2
I. Process processing functions1. Process startup FunctionFunction Name evalCall the syntax eval_r (string)The description regards string as a Perl statement execution.After the command is correctly executed, the
I. Process processing functions
1. Process startup Function
Function Name eval
Call the syntax eval (string)
Describe the stringPerlStatement execution.
After the command is correctly executed, the system variable $ @ is an empty string. If an error
According to Xiao Peng, first change the detection script of yesterday to the one with the reset function, and then send the alarm prompt to the specified mailbox by email.
Certificate ---------------------------------------------------------------
These days I looked at Perl's event programming framework Anyevent, focusing on a few articles:
http://search.cpan.org/~mlehmann/AnyEvent-7.05/lib/AnyEvent.pm
Http://search.cpan.org/~mlehmann/AnyEvent-7.05/lib/AnyEvent/Intro.pod
The main methods are summarized as follows:1.System ("command");Using this command will open a child process to execute the command in quotation marks, and the parent process will wait for the child process to end and continue executing the
Hello WorldA simple Hello World example:
Copy Code code as follows:
#!/usr/bin/env Perl
Use strict;
Use warnings;
Use Cgi::fast;
while (my $q = new Cgi::fast)
{
Print $q->header ("Text/plain");
print "Hello World";
}
Sometimes we execute a script, because some programs in the script are suspended and time-out, which affects our judgment on the next step. At will, it is necessary to set the timeout settings for functions and processes so that they can return a
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.