Perl + fastcgi + nginx Build
Nginx + fastcgi is the most popular environment in PHP, then Perl will also have fastcgi it, of course, Today to build the next Nginx Perl fastcgi. Performance is no less than PHP, but now the popularity of Web programs
This article mainly introduces the capture warning information in Perl, exception information and write to the log in detail, this article gives the capture warning-not processing, catch warning-and converted to exceptions, catch warnings-and write
Capture warning information and exception information in Perl and write logs
This article describes how to capture warning information, exception information, and write logs in Perl, this article provides practical examples of capturing warnings-not
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,
While learning Perl, Python, and shell scripts can easily confuse their syntax, this article is primarily a personal summary that facilitates the use of queries.Perl basic syntax, installation, help documentation
File Header format: #
The author's nginx installation directory is/usr/local/nginx virtual machine configuration file/usr/local/nginx/conf/vhosts. conf phpfast-cgi currently supports the following operations to install the perlcgi module wgethttp: // www.cpan.org/modules/
The installation directory of nginx is/usr/local/nginx.
The virtual machine configuration file is/usr/local/nginx/conf/vhosts. conf.
Currently, php fast-cgi supports
The following operations are completed under su:
==================================
There are many ways to read the last row of a file in Perl, such
(1) read the file into the array and obtain the last element.
Open (FILE, "file.txt") or die "$! "; My @ arr = ; close FILE; my $ last = $ arr [$ # arr]; # $ last is the content of 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";
}
There are many ways to read the last line of a file in Perl, such as(1) Read the file into the array and take the last elementOpen (FILE, "file.txt") or Die "$!"; My @arr =;; Close File;my $last = $arr [$ #arr];# $last is the last line of content.(2)
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.