in reply to how do I iterate over a hash of hashes?
you have to loop over the keys of both hashes (perldsc has more info), like this:
for my $first_key ( keys %HoH ) { print "$first_key: \n"; for my $second_key ( keys %{ $HoH{$first_key} } ) { print "$second_key=$HoH{$first_key}{$second_key} "; } print "\n"; }
Update: Fixed typo in second for loop.
"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce
|
|---|