while ( my ($key1,$hash1) = each %{$hoh} ) { while ( my ($key2,$value) = each %{$hash1} ) { ### CODE ### } }