in reply to Re^2: sorting a hash
in thread sorting a hash

My interpretation of the OP's question was that the records were much larger than the keys, and making a separate sorted list of the records would require copying a lot of bytes. Sorting the keys still requires "making a list of them", i.e. copying, the number of bytes copied would be much smaller.

Did I miss something?

the lowliest monk

Replies are listed 'Best First'.
Re^4: sorting a hash
by Ben Win Lue (Friar) on Mar 27, 2005 at 17:33 UTC
    Thanks a lot to everyone. Especially the links were helpful.

    It looks like I have to do as much copying operations as I expected.
    But the hints you gave me give my code more perlish elegance.

    Pustular Postulant is right, the records are much larger than the keys - but rethinking it - the records are just stored as pointers in a hash of hashes. So copying them won't hurt that much