![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Comparing modification times like makeby Krambambuli (Curate) |
on Oct 27, 2008 at 12:57 UTC ( #719731=note: print w/replies, xml ) | Need Help?? |
The Perl Cookbook recommends ------------- Recipe 9.1. Getting and Setting Timestamps 9.1.1. Problem You need to retrieve or alter when a file was last modified (written or changed) or accessed (read). 9.1.2. Solution Use stat to get those times and utime to set them. Both functions are built into Perl: ($READTIME, $WRITETIME) = (stat($filename))[8,9]; utime($NEWREADTIME, $NEWWRITETIME, $filename); 9.1.3. Discussion [...] ----------- But I do not know how well this does on Windows. Updated formatting error, to show the code correctly - thanks Perlbotics Krambambuli ---
In Section
Seekers of Perl Wisdom
|
|