foreach $i (keys %hash) { foreach $j (keys %{ $hash{$i} }) { print $i, $j, $hash{$i}{$j}, "\n"; } }