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