mtime is the number of seconds since 1970 (at least on UNIX-ish systems).
You can compare it to time() to see how old the file is.
my $mtime = (stat $filename)[9]; my $age = time() - $mtime; die "HEY! $filename was created in the future!\n" if $age < 0; print "$filename is $age seconds old\n";
In reply to Re: How do I interpret mtime with stat()?
by extremely
in thread How do I interpret mtime with stat()?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |