The following script produces no output:
use File::stat;
use Time::localtime;
my $filename = 'c:\testfile';
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
print("$mtime");
c:\testfile
exists.
I've seen several answers on SO -- this, for example -- which seem to suggest that the array returned by stat()
should have something meaningful in it, but I haven't seen that to be the case in practice.
This is 64 bit ActivePerl on Windows 7.
Does stat not do what those answers seemed to imply, or do Perl's file date/time functions not work under Windows (or 64 bit Windows, or some such?)