foreach my $key3 (sort keys %{$hash{$hash{$key1}} } ){ ... }
This may serve you better (untested):
foreach my $key3 (sort keys %{ $hash{$key1}{$key2} }) { ... }
Also note that with Perl version 5.14+, keys et al will take a hash reference directly: see keys EXPR
In reply to Re: Hash with three keys
by AnomalousMonk
in thread Hash with three keys
by Jeri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |