for my $key(keys %termservers) { for my $key2(keys %{$termservers{$key}}) { print "$key1 - $key2 = $termservers{$key1}{$key2}\n"; } }