in reply to Check Directories for Files

Another approach. You should be able to see how you could recurse into sub-dirs with the same idea. Path::Class.

use Path::Class (); my $dir = Path::Class::Dir->new("D:/DOWNLOAD/DISTRBTN/I01/"); for my $file ( grep { not $_->is_dir } $dir->children ) { print $file, $/; }