Speedfreak has asked for the wisdom of the Perl Monks concerning the following question:
Hej all
Heres an interesting one...
I have a delimited file which contains 3 fields; date, id and title. Now, what I am doing is opening this file, reading in the file and pushing it into an array so I have ($date, $id, $title)
Once I have the array and the file closed, I want to sort the array (if necessary pushing the sort into another array) using the date field with the most recent date as 1 and the oldest as the last.
The date format is "yyyy-mm-dd" and I am only looking at about 100 records or so, so nothing massive.
Can anyone give me some pointers?
- Jed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting an array by dates in a field...
by voyager (Friar) on Jul 07, 2001 at 03:07 UTC | |
|
Re: Sorting an array by dates in a field...
by Zaxo (Archbishop) on Jul 07, 2001 at 06:25 UTC | |
by yakoval (Novice) on Feb 13, 2010 at 09:25 UTC | |
|
Re: Sorting an array by dates in a field...
by myocom (Deacon) on Jul 07, 2001 at 02:56 UTC | |
by Speedfreak (Sexton) on Jul 07, 2001 at 03:25 UTC | |
|
Re: Sorting an array by dates in a field...
by mr.dunstan (Monk) on Jul 07, 2001 at 04:20 UTC |