use File::stat; my $stat = stat("file.txt"); print $stat->mtime;