hashes have no order, you can't sort them
> I need to sort the inner hash referenced by test1, test2, test3, test4.
> ...
> sort{ } keys %rankBased;
Looks like you take $a and $b from the outer hash-keys not the inner.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Sorting perl hash
by LanX
in thread Sorting perl hash
by paul05
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |