in reply to Sorry, Caffeine Deficiency
in thread Sorting Hash of Arrays by a Value
First, I recommend perldoc perldsc.
It does a good job of covering arrays of hashes, hashes of arrays, and all the other permutations.
Second, did you mean
I'm not clear on what the structure of info is, from your description. Can you post an example of how it gets initialized?my @keys = sort { $info{$b}->[64] <=> $info{$a}->[64] || length($b) <=> length($a) || $a cmp $b } keys %info;
Also, your 2nd and 3rd comparisons are a bit strange. Are you really sorting by value, then by the length of the key strings, then finally by the comparison of the keys?
Odd... The length($b)<=>length($a) step looks quite out of place.
--
Mike
|
|---|