Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Reading files with dates
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



Report this thread to moderator Post Follow-up to this message
Old Post
Jason Vriends
03-19-04 06:26 PM


Re: Reading files with dates
In 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

Report this thread to moderator Post Follow-up to this message
Old Post
Vorxion
03-19-04 06:26 PM


Re: Reading files with dates
"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.



Report this thread to moderator Post Follow-up to this message
Old Post
Tintin
03-19-04 06:26 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Freelance archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:55 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.