for my $k1 ( sort keys %$rHoH) { print "\nk1: $k1\n"; for my $k2 ( keys %{$rHoH{ $k1 }} ) { print "k2: $k2 $rHoH{ $k1 }->{ $k2 }\n"; } }