my $hash_has_undef = do { local $_; 1 until defined or not (undef, $_) = each %hash; defined; };