localtime EXPRlocaltime引用方法:my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;$sec,$min,$hour : seconds, minutes, and hours of the specified time.$mday : the day of the month $mon &n...【阅读全文】
问题说明:假设有文件夹data,里面含有很多.TXT域名的文件,而文件里有特定字符需要匹配,并输出该行。#!/usr/bin/perl -wuse strict;opendir IN,"data" || die "can't open : $!\n";open OUT,">>outfile";my @file=grep (/\.TXT/,readdir IN);foreach my $list(@file){ open TWO,"data/$list" o...【阅读全文】
The hash %SIG contains signal handlers for signals.-- SIG 是一个公用的存储信号的一个哈希变量点击(此处)折叠或打开[myang@mnsdev13:~/demo]$ cat sig.pl#!/usr/local/bin/perl5$SIG{TERM} = $SIG{INT} = \&yoursub ;$i = 1;...【阅读全文】