in reply to Getting file properties returns 1970 modify time
readdir doesn't put the directory name on what it returns, so when you call stat you're not getting any results (and hence $mtime is undef and localtime will return the epoch). You need to do stat( "$dir/$file" ) instead, or change your working directory to $dir.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting file properties returns 1970 modify time
by NarendraTTT (Initiate) on Jan 06, 2005 at 04:51 UTC |