Have you ever encountered Unix, a directory file too many, cannot remove the phenomenon, I wrote a perl program for everyone to delete
Copy Code code as follows:
Cat > del.pl
#!/usr/bin/perl
$file 1= $ARGV [0];
@tests = (1,2,3,4,5,6,7,
There is an instance where Perl reads a pattern from the configuration file, which has a combination of shell commands to get current information about Linux, and the entire pattern is complete after getting the return value of the shell
Multi-process: With multiple PID, the memory is occupied independently.Multi-threaded: does not have a separate PID.Select: Multiple processes can be selected without the output of the shared variables, etc., when a partial independent generation of
Page not found ... yet!None of these routes could generate a response for your POST request /login for, maybe you need To add a new one?$r->post ('/login ')->to (' Postpage#login ');Debug prompt: ... I don't know what the template actually will be
Source:Http://www.cnblogs.com/itech/archive/2012/12/17/2822044.htmlInstall your own Perl modules. When you do not have root privileges, you need to install Perl modules into your home directory.From:
Http://www.activestate.com/activeperl/downloadsWhen installed, Perl is placed in the path of the environment variable by defaultAfter that, you need to restart your computer to make sure that the environment variable takes effectExecute perl-version
The 18th chapter: Testing and debugging second-Qi.Write a test case first. Ii. Ba.standardize your test cases with test::simple or test::more. Nine.standardize your test set with test::harness. Ii. 0.Write a failed test case. three.both possible and
The file test is used primarily to view information such as the existence of a file, file size, file update time, and so on.File Test OperatorsWhether the-e test file exists;Die "oops! A file called ' $filename ' already exists.\n "if-e $filename;-m
After installing carbide C/C ++, I encountered a problem:
---------------------------Perl.exe-unable to locate component---------------------------This application has failed to start because perl58.dll was not
Found. Re-installing the
1. delimiters
= ~ M/there /;
= ~ S/there/here /;
There are also types of delimiters:
= ~ /There/
= ~ M # there #;
= ~ S # there # here #;
= ~ M (there );
= ~ S (there) (here );
= ~ M {there };
= ~ S {there} {here };
= ~ M [there];
= ~ S [there]
Install the cache: memcahced Module
First install and configure CPAN, and use CPAN to install the cache: memcahced Module
Yum-y install CPAN
Vim/usr/share/perl5/CPAN/config. PM
Set the image path:
'Urllist' => [Q [http://mirrors.ustc.edu.cn/cpan/
When processing text, we often encounter the following situation: we need to compare the two lines of text and then output them selectively. By default, only one row can be read at a time in the while () {do something} block. Here, I will give a
Perl is often used to process files in CSV format. Such files are similar to two-dimensional arrays, so operations on two-dimensional arrays are actually performed.For such a row and column table, we often need to sort by a column or by a column
Grep returns all elements that meet the conditions in a number. Map converts all elements in the number and returns results. Both of them traverse the array, but one is used for search and the other is used for conversion. Both support expressions
Perl generally has three methods to define a variable: 1. $ Var = "XXX" 2. local ($ var) = "XXX" 3. my ($ var) = "XXX" the first method is to define a global variable, the second method is to define a local variable, and the third method is to
Delete an object
Use unlinke functions, such as unlink $ file, unlink $ file1, $ file2, $ file3
Open a file
Open the file with three parameters, which makes it easy to differentiate the mode and file name. This method is supported in Versions later
As a scripting language, Perl is a powerful tool for system management. Proficient in Perl can greatly improve work efficiency. Therefore, no matter whether it is specialized as a Perl programmer or not, it depends on whether it is popular or not!
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