Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would like to check the last modified time of my file. So does the following code look okay:
my $hour = 1 / 24; while ( -M $myFile < $hour ) { sleep (10); } if ( -M $myFile > $hour ) { print "file has not been modified for more than 1 hr \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: file modified
by merlyn (Sage) on Jan 07, 2005 at 16:06 UTC | |
by ambrus (Abbot) on Jan 07, 2005 at 16:20 UTC | |
|
Re: file modified
by ambrus (Abbot) on Jan 07, 2005 at 16:23 UTC | |
by Anonymous Monk on Jan 07, 2005 at 16:36 UTC | |
by merlyn (Sage) on Jan 07, 2005 at 17:00 UTC |