File glob'it, and watch newbies cower in AWE!
my @dirc = <*>;
foreach $dir (@dirc) {
print "$dir\n";
print " -- Found $dir\n"
if $dir =~ /example(\d*?)\.txt/;
}
Only one line shorter, but I do think is more efficient. In reply to Re: Reading specific files from a directory
by Anonymous Monk
in thread Reading specific files from a directory
by Lexicon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |