Why does Perl complain about "Unsuccessful stat on filename containing newline"?
- by Daniel
Hello, I am getting an error I do not understand. I am using File:Find to recurse a fylesystem on Windows using Activestate Perl 5.8.8 and trying to stat $File::Find::name; so I am not stat-ing a filename got from a text file scanning requiring chomp-ing or newline removing. I was unable to get file modification time, the mtime in:
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($File::Find::name);
so trying a
-s $File::Find::name
gives me the error:
Unsuccessful stat on filename containing newline
A typical file name found is F01-01-10 Num 0-00000.pdf but I get the same error even renaming in E02.pdf