![]() |
|
XP is just a number | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Not to complicate matters, but you could also use stat(). Using stat() is particularly useful if you want to see the actual datestamp that the file was last modified, whereas -M only returns the number of days since modification. It is possible to get get the actual datestamp if you've only used -M, but you'd have to use Date::Manip. To do the whole process using stat(), you could do it something like this:
It is then a trivial matter to retrieve the exact date of the modification, like so: $date = localtime( (stat($file) )[9] ); Or, using the first example, since we've already got the modification time stored in $mod_time, we'd simply have to use $date = localtime( $mod_time ). In reply to Re: Checking file Mod date
by sifukurt
|
|