You aren't telling us if the directory exists or not. Perl only gives you a helpfull warning, just in case you are trying to stat a file/directory with a newline in it - which would be a common programming error.
If you want to avoid the warning, just use
{ no warnings 'newline'; next if -d "$dir/$current_filename"; };
In reply to Re^3: Perl stricter than my OS regarding file/dir names
by Corion
in thread Perl stricter than my OS regarding file/dir names
by jffry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |