my $mtime = (stat $file)[9]; use POSIX 'strftime'; print strftime "any format you like", localtime $mtime;