Perl: the Markov chain saw | |
PerlMonks |
Re: Wrong Results in checking if hash value is defined or notby sundialsvc4 (Abbot) |
on Jun 30, 2017 at 14:54 UTC ( [id://1193939]=note: print w/replies, xml ) | Need Help?? |
From perldoc perlfunc, on the entry for “defined()”: When used on a hash element, it tells you whether the value is defined, not whether the key exists in the hash. Use "exists" for the latter purpose.
In Section
Seekers of Perl Wisdom
|
|