simple_find("5.6.0");# 含 .pm 文件的源目录 use Pod::Html; sub simple_find{ $sourth="/usr/local/lib/perl5/5.6.0html/"; #含 .html的目标目录 my ($input)=@_; my $file; $ddir=$sourth.$input; $cont=`file $ddir`; if ($cont !~/$ddir\:\sdirectory/){ `mkdir $ddir`; } opendir(md,$input); my @file=readdir(md); closedir(md);
@pfile= grep(m/\.pm/,@file); my @dfile= grep(!m/\.pm/,@file); @dfile=grep(!m/^\./,@dfile);