There's a typo in the code you provided.
sub walk_hash { my ($h1, $h2) = shift; foreach my $key (keys %$h) { # I presume you mean %$h1 here? if( ref $h->{$key}) { # And $h1->... here? walk_hash( $h->{$key} ); # and here? } else { print $h->{$key}; # and here as well? } } }
Other than that, I suggest you check the modules Tux pointed at, above.
In reply to Re: Comparing two deep hash of hashes
by muba
in thread Comparing two deep hash of hashes
by TJRandall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |