So you would benefit here from recursion:
traverse(\%my_hash); sub traverse { my $hash_ref = shift; while ( my( $key, $value ) = each %{ $hash_ref } ) { if( ref $value ) { traverse( $value ); } else { print "$key => $value\n"; } } }
Dave
In reply to Re^5: Nested while each over a hash -> infinite loop
by davido
in thread Nested while each over a hash -> infinite loop
by Eythil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |