Then use @files_i_want as desired.opendir(DIR, $somedir) or die "can't open $somedir for read: $!\n"; @files_i_want = grep { /^example\d(?:\.\d)*\.txt$/ } readdir DIR; closedir(DIR) or die "error closing $somedir: $!\n";
In reply to (sacked) Re: Reading specific files from a directory
by sacked
in thread Reading specific files from a directory
by Lexicon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |