in reply to Sorting hash

You can use the Tie::Hash::Sorted module. This module presents hashes in sorted order.

Alternatively, you can also use the Tie::IxHash module and add the elements into the hash in ascending order of $a. Tie::IxHash module implements hashes that preserve the order in which the hash elements were added into the hash.

Replies are listed 'Best First'.
Re^2: Sorting hash
by johngg (Canon) on Feb 21, 2008 at 11:58 UTC
    I think the thread title is misleading, the OP is actually trying to sort an array of hashes by one of the hash elements.

    Cheers,

    JohnGG