3.2.34 exists
exists
This function returns true if the specified hash key exists in its hash, even if the corresponding value is undefined. print "Exists\n" if exists $hash{$key}; print "Defined\n" if defined $hash{$key}; print "True\n" if $hash{$key}; A hash element can only be true if it's defined, and can only be defined if it exists, but the reverse doesn't necessarily hold true in either case.
if (exists $ref->[$x][$y]{$key}) { ... } |
|