in reply to stat($filename) fails ?!

You doesn't use File::stat module properly. Calling stat($filename) returns reference to the stat object. So this is the way you should use it:

#!/usr/bin/env perl use strict; use warnings; use File::stat; my $filename = $ARGV[0]; my $stat_obj = stat($filename) or die "Can't stat $filename"; print "$filename at " . $stat_obj->mtime() . "\n";