#windows下的版本 遍历指定目录
#!/usr/bin/perl -w
use warnings;
my $dir_path = "C:\\pbotnew"; # 注意"\\"的写法
opendir DH, $dir_path or die "Can not open \n";
@filelist = readdir DH;
foreach $file (@filelist) {
print $dir_path."\\".$file."\n";
}
closedir DH;
遍历指定目录
最新推荐文章于 2022-11-24 10:57:49 发布