SyntaxFix
Write A Post
Hire A Developer
Questions
I think you're looking for the stat function (perldoc -f stat)
stat
perldoc -f stat
In particular, the 9th field (10th, index #9) of the returned list is the last modify time of the file in seconds since the epoch.
So:
my $last_modified = (stat($fh))[9];