NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node was taken out by the NodeReaper on Apr 26, 2013 at 03:19 UTC

Replies are listed 'Best First'.
Re: Understading array of hashes
by choroba (Cardinal) on Apr 23, 2013 at 12:16 UTC
    You were almost there. You just need to really create the hash of hashes, not just look at it (line 39):
    undef $hash{$_->{'type'}}{ $_->{'name'} } for @$array;
    And, when printing out, the undefs are not interesting, so leave them out (line 45):
    print " $k2\n";
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ