![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Getting modified date for a file (Win32)by ciryon (Sexton) |
on Aug 18, 2004 at 09:26 UTC ( #383902=perlquestion: print w/replies, xml ) | Need Help?? |
ciryon has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, I'm trying to get a script to work in win32 environment and need some kind of equivalent for: return (stat($file))[9]; which returns the modified date for a file but doesn't seem to work here since all dates look like "1970-01-01 00:00:00". Grateful for help. Update: The stat function seems to work, at least when I try it with Active Perl. I forgot to mention that I'm using mod_perl. I also tried Corion's suggestion of enabling warnings, but nothing shows up. Update II: I think I found the problem. It reports correct dates on files, but not on directories.
Back to
Seekers of Perl Wisdom
|
|