Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a array of hashes, of which one key and value pair represents the day of a month. eg '19' or '21' etc. Another pair contains 24 hour clock readings, eg. '00' '01'...'23'. I want to sort the whole structure by date, but not in chronological order. I want to have the data arranged in a preset order, eg data from the 21st, then from the 17th, then the 14th etc. This order would be stored in another array. I then want to sort them within each date, by hour by a normal ascending sort.
I have previously been using 'sort' to sort them both chronologicaly, can sort support this more specific type of search? Is there another function, or will I need to scratch write it?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Sorting into a Specific Order
by merlyn (Sage) on Aug 29, 2002 at 11:10 UTC | |
by Notromda (Pilgrim) on Aug 29, 2002 at 15:10 UTC | |
by merlyn (Sage) on Aug 29, 2002 at 15:16 UTC | |
|
Re: Sorting into a Specific Order
by RMGir (Prior) on Aug 29, 2002 at 12:03 UTC |