in reply to Defined and Exists, but what about neither?
No, that is not possible. If there is a key present there is
also a value. The value could be undefined though.
Of course, this is also documented in the manual: perldoc -f exists.exists $hash {key} && print "Key is present, value may be undefined." +; defined $hash {key} && print "Key is present, and its value is defined +."; $hash {key} && print "Key is present, its value is defined and + true.";
Abigail
|
---|
In Section
Seekers of Perl Wisdom