
perl
surayang
The man who has made up his mind to win will never say "Impossible".
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Perl 脚本命令行传入参数
#!perl -w# ===============================================================================# 这一段要放在perl文件的开头部分,不然ARGV使用起来有点问题。$argc = $#ARGV + 1;print"Total command line arguments received: $argc \n";foreach $argument (0 .. $#ARGV) { print"$ARGV[$a..原创 2022-04-20 15:01:36 · 1834 阅读 · 0 评论 -
Perl按修改日期排序文件
my $path="D:\\perl";my $file;chomp($path);my $filename;opendir(DIR, "$path") || die "Cannot open it:$!";@filename = grep -f, readdir(DIR);close DIR;@files = sort{ -M "$path/$b" -M "$path//$a原创 2015-06-17 10:10:36 · 1273 阅读 · 0 评论 -
Sorting in Perl
Sorting in PerlJohn Klassa / Raleigh Perl Mongers / June, 2000 IntroductionPerl has a built-in "sort" function.It uses a quicksort algorithm, which has good (in fact, O(n log n)) perfo原创 2015-06-17 10:22:43 · 598 阅读 · 0 评论 -
Perl获取指定目录中的文件
use strict;my $path="D:\\perl";my $keyfile;my $keytime;opendir(dir, $path) or die "Cannot open it:$!";print "\n";while(my @count= grep -f, readdir(dir)) # -f表示选出目录中的文件{closedir(di原创 2015-06-17 09:43:31 · 1704 阅读 · 0 评论