my $x = undef; my $y = undef; if ($y) { ... } if (! $y) { ... } if ($y && ! $y) { ... } if (exists $x->{notdef}) { ... } if (defined $x->{notdef}) { ... } if ($x->{notdef}) { ... } # and none of those autovivify it.