Perl: Unsuccessful stat on filename containing newline. What?

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-04-16T10:46:04Z Indexed on 2010/04/16 13:53 UTC
Read the original article Hit count: 308

Filed under:

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 m 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 

give 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

Some ideas about a possible reason for this error?

© Stack Overflow or respective owner

Related posts about perl