I have a variable called $filename that stores the location of a file. I'm using this code snippet
$filestats = stat($filename);
$thedate = $filestats->mtime;
$datestr = strftime("%Y-%m-%d",$thedate);
when it gets the the "$datestr = etc..." line I get this error:
"- 255 CGI returned nonzero...
As far as I can find readdir will let you read the names of a file into an array, but it doesn't sort them at all. I think I can right a script using readdir I just need to know how to access a files date modified or date created property.
--paul
It has been a while sine I last used Perl. So I'm a little rusty. What I want to do is write a script that will read the names of all the files in a folder into an array and sort them by they're date modified property. Any help would be greatly appreciated.
Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.