Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
let's say I wanted to sort this array multiple times, and instead of wasting CPU power, I wanted to record the order to an array instead.
When you say "sort ... multiple times", do you actually mean "print the sorted array multiple times", or something else like "sort it into different orderings (and print any of these orderings at any time)" ? If the former, note that by sorting the array once, it remains in the sorted order -- you'll always see that order when printing the array sequentially. The latter case is good if you have an interactive process (e.g. a GUI of some sort for viewing the data), and you want the user to be able to change the viewing order at will (e.g. sorted by one or another dimension of the array). Is something like this what you're trying to do?
In reply to Re: Sorting two dimensional arrays
by graff
|
|