Here is what I get:use strict; my %hash = (name1 => {iid1 => '6', iid2 => '3', iid3 => '4'}, name2=> { iid4 => '3', iid6 => '5', iid2 => '2'} ); foreach my $name (keys %hash) { my $count=0; print "Name: $name\n"; foreach my $iid (keys %{$hash{$name}}) { print "$hash{$name}{$iid}\t\t $iid\n"; $count=$hash{$name}{$iid} + $count; } print "$count\t\t TOTAL\n\n"; }
In reply to Sorting an HoH (Or Something?) by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |