in reply to How can I get -M to work properly?
It's always a good idea to check the results of file tests.
$ perl -e '$age = -M "foo.txt" or die "problem: $!"; print "Age: $age\n"'
Age: 6.13123842592593
$ perl -e '$age = -M "foobar.txt" or die "problem: $!"; print "Age: $age\n"'
problem: No such file or directory at -e line 1.
|
|---|