http://www.perlmonks.org?node_id=85888


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