in reply to How do I read files in a directory and not directories?

Use -d to check if it's a dir. Better yet, use -f to check if it's a normal file.

my $path = File::Spec->catdir($dir, $file); next unless -f $path;

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.