my %beancounts; while (<>) { my ($x, $y) = split; ++$beancounts{$x}{$y}; } for my $x (sort {$a <=> $b} keys %beancounts) { for my $y (sort {$a <=> $b} keys %{$beancounts{$x}}) { print "$x $y $beancounts{$x}{$y}\n"; } }
In reply to Re^2: 3d arrays
by Roy Johnson
in thread 3d arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |