NarendraTTT has asked for the wisdom of the Perl Monks concerning the following question:
But, I keep getting modify date of 1/1/1970 for ALL the files in the directory even though they were modified yesterday, today etc.opendir(BIN, $dir) or die "Can't open $dir: $!"; while( defined ($file = readdir BIN) ) { next if !($file =~ /^TT\.*/); $mtime= (stat($file))[9]; ($Second, $Minute, $Hour, $Day, $Month, $Year, $WeekDa +y, $DayOfYear, $IsDST) = localtime($mtime); $Month=$Month+1; print $Year."\n"; $Year=$Year-100; ......
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting file properties returns 1970 modify time
by Fletch (Bishop) on Jan 06, 2005 at 04:27 UTC | |
by NarendraTTT (Initiate) on Jan 06, 2005 at 04:51 UTC |