You can get the last modified time of a file using stat. But I don't know how you expect to get it using a program that is not running.
| We're not surrounded, we're in a target-rich environment! |
|---|
$modifytime = (stat($filename))[9]; print $modifytime;
my $mod = (stat $0)[9]; print scalar localtime($mod);You can create your own date formats by getting the local time in "broken-down" format, see perldoc -f localtime, or using POSIX::strftime.
perlmonks.org content © perlmonks.org and bart, cdarke, Fletch, jasonk, perlsen, Win, Zaxo
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03