in reply to sorted Hash
In the Tutorials section, you will find A brief tutorial on Perl's native sorting facilities.
The following link is indirectly accessible via the link given above, but it's a bit deeply buried there and I want to bring it above the fold because it's such a good article: A Fresh Look at Efficient Perl Sorting.
Give a man a fish: <%-{-{-{-<