in reply to Sorting a Hash of Hashes

Other Monks have already provided you with the answer to your problem. However, it might save you a little typing and also save entries in the symbol table if you set up your $ref_HoH directly using the curly brace anonymous hash constructor, like this

my $ref_HoH = { 11 => { 4 => 'Four', }, 33 => { 1 => 'One', }, 2 => { 2 => 'Two', }, };

Note also that you don't need to quote your hash keys (unless they contain spaces) when using the => (fat comma).

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Sorting a Hash of Hashes
by Anonymous Monk on Jul 09, 2006 at 15:11 UTC
    You guys rock! Thanks so much for the replies. I am all for simplicity. I was a little confused following the code in the cookbook in Programming Perl.