in reply to How to pattern match filenames in readdir?
Try this:
opendir (DIR, "$dir") || die "cant open dir.\n"; my @files = grep { /BLAH/ } readdir (DIR); closedir (DIR); for (@files) { do something; }
Zenon Zabinski | zdog | zdog7@hotmail.com
|
---|
In Section
Seekers of Perl Wisdom