in reply to How do I interpret mtime with stat()?

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";

Replies are listed 'Best First'.
RE: Answer: How do I interpret mtime with stat()?
by extremely (Priest) on Oct 21, 2000 at 11:35 UTC
    *sigh* time only has one "t" in it. Promise...

    --
    $you = new YOU;
    honk() if $you->love(perl)