The original author may want to have a look at
The indirect Sort.
This is the technique that runrig demonstrated.
The page linked above shows the same technique with a simpler example
and a little more explanation.
Comment on Re: How do you sort a hash of array refs?