in reply to How to get list of files with .fmb extension in windows

Without using File::Spec, you could do (replacing the values as needed):

#!/perl/bin/perl -w use strict; use Data::Dumper; my $dir = 'C:/WINNT'; my $searchext = 'dll'; opendir(DIR, $dir) || die qq(Could not open directory "$dir"\n); my @files = grep { /\.${searchext}$/ } readdir(DIR); print Dumper(\@files);

Update:  If you need to check for these files also in the subdirectories (or multiple other directories), my knee-jerk reaction is to use File::Find, which works very well for that purpose.


Where do you want *them* to go today?