in reply to how to get a value corresponding to a key

The term 'traverse', strongly suggests a recursive search of a hash of hash of ... of hash.
Traverse( \%yourhash, \$output, 'matchKey' ); sub Traverse{ my $href = shift; my $oref = shift; my $match = shift; for my $key ( keys %$href ) { if ( ref( $href -> { $key }) eq 'HASH') { Traverse( $href -> { $key }, $oref ); } else { ( $key eq $match ) and $$oref = $href -> { $key }; } } }

One world, one people