Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: I've got a hash of hashes how do i get my values out

by hardburn (Abbot)
on Sep 10, 2004 at 16:11 UTC ( [id://390129] : note . print w/replies, xml ) Need Help??


in reply to I've got a hash of hashes how do i get my values out

For HoHes nested arbitrarily deep:

sub walk_hash { my $h = shift; foreach my $key (keys %$h) { if( ref $h->{$key}) { walk_hash( $h->{$key} ); } else { print $h->{$key}; } } }

This has been tested.