Apr 13, 2006 #1 tswitz00 IS-IT--Management Jan 26, 2005 67 US How can I use perl to find the creation date of a file or folder?
Apr 13, 2006 #2 PaulTEG Technical User Sep 26, 2002 4,469 IE google for perlfunc and stat Paul ------------------------------------ Spend an hour a week on CPAN, helps cure all known programming ailments ;-) Upvote 0 Downvote
google for perlfunc and stat Paul ------------------------------------ Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
Apr 13, 2006 Thread starter #3 tswitz00 IS-IT--Management Jan 26, 2005 67 US use File::stat; use Time::localtime; $date_string = ctime(stat($file)->ctime); Upvote 0 Downvote
Apr 13, 2006 #4 keak Programmer Sep 12, 2005 247 CA Alternatively, if you are on unix/linux Code: $ls_command =`ls -ld your_directory`; ($date, $time) = (split(/\s+/, $ls_command)) [5,6] print "$date, $time"; Upvote 0 Downvote
Alternatively, if you are on unix/linux Code: $ls_command =`ls -ld your_directory`; ($date, $time) = (split(/\s+/, $ls_command)) [5,6] print "$date, $time";