Code Comments
Programming Forum and web based access to our favorite programming groups.Can someone help me out. I'm trying to have perl read a directoy into an array with the date of the file. I tried to use "LS" then have perl use Regular Experssions but there must be an easier way
Post Follow-up to this messageIn article <VjAsb.7418$iD1.6787@news04.bloor.is.net.cable.rogers.com>, Jason Vriends wrote: >Can someone help me out. I'm trying to have perl read a directoy into an >array with the date of the file. I tried to use "LS" then have perl use >Regular Experssions but there must be an easier way You don't really want an array, you want a hash. Key of filename, value of date. That way your data is easily bound. DO NOT use the date as the key, as you can have duplicates that will overwrite other entries. perldoc -f opendir perldoc -f readdir perldoc -f stat You'll be getting your timestamps from stat(). -- Vorxion - Member of The Vortexa Elite
Post Follow-up to this message"Jason Vriends" <vriends@rogers.com> wrote in message news:VjAsb.7418$iD1.6787@news04.bloor.is.net.cable.rogers.com... > Can someone help me out. I'm trying to have perl read a directoy into an > array with the date of the file. I tried to use "LS" then have perl use > Regular Experssions but there must be an easier way What the hell is "LS"? There's no such command (unless you like aliasing every Unix command to uppercase) perldoc -f glob perldoc -f stat will give you all the info you need, otherwise you can come an pay one of the freelance experts here to do the job for you.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.