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;
In reply to Re: How do I read files in a directory and not directories?
by ikegami
in thread How do I read files in a directory and not directories?
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |