my $hash; print "\$hash is: ", defined $hash ? $hash : "undefined", "\n"; if ($hash->{one}){ print "'one' exists\n"; } print "\$hash is: ", defined $hash ? $hash : "undefined", "\n";