You can either store the result of stat in an array:
my @stat = stat $filename; say $stat[5];
or you can use the File::stat module, in which case you get an object back:
use File::stat; my $stat_obj = stat $filename; print $stat_obj->mtime;
But you have to decide for one way or another -- mixing them is what led to your confusion in the first place.
In reply to Re: stat a file
by moritz
in thread stat a file
by pelos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |