- or download this
opendir (DIR, "C:/temp") or die "unable to open C:/temp $!\n";
my @files2 = grep{/\.pl$/}readdir DIR;
print join("\n",@files2),"\n";
- or download this
my @files = glob("C:/temp/*.pl");
print join("\n",@files),"\n"; #full paths
- or download this
opendir (DIR, "/root") or die "unable to open /root $!\n";
@all = grep{-f}readdir DIR;