use File::stat; my $stat = stat($file) or die "Could not stat $file: $!\n"; print $stat->mtime;