for my $ip ( keys %HoH ) { if ( $HoH{$ip}->{22} ) { print "Port 22 bei Host $ip offen\n"; } }