You doesn't use File::stat module properly. Calling stat($filename) returns reference to the stat object. So this is the way you should use it:
#!/usr/bin/env perl use strict; use warnings; use File::stat; my $filename = $ARGV[0]; my $stat_obj = stat($filename) or die "Can't stat $filename"; print "$filename at " . $stat_obj->mtime() . "\n";
In reply to Re: stat($filename) fails ?!
by XooR
in thread stat($filename) fails ?!
by natol44
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |