Another answer is to use glob'ing:my @files = grep /\.dat$/, readdir DIR;
while (<*.dat>) { my $file = $_; open(...etc.,etc.); ... } }
In reply to Re: filtering file names to be added to an array...maybe.
by runrig
in thread filtering file names to be added to an array...maybe.
by udigthis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |