sorting entires by dateby Anonymous Monk
|on Jan 01, 2004 at 22:46 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
i'm writing a script to organize images in an online gallery, and i can't seem to work my mind around how to sort these images by date. i've got a text file with entries like such:
where FILE is the alphanumeric filename, WIDTH and HEIGHT are numeric dimensions, and TIME is a time string such as you'd get from time().
now, all these entries are in a text file, seperated by newlines like so:
and so on. what i need to do, is rearrange this text file to sort the entries by that time string so that the newer ones are at the beginning. any ideas on the best way to do this?