Keep It Simple, Stupid | |
PerlMonks |
Re^3: Checking if hash value exists without implicitly defining itby Kenosis (Priest) |
on Feb 15, 2013 at 15:47 UTC ( [id://1018900]=note: print w/replies, xml ) | Need Help?? |
Yes, you're correct! Originally omitted exists when not testing for the final value--then overgeneralized. However, testing $Hash{$neededVal}{param1}{key1} would fail when $Hash{$neededVal}{param1}{key1} == 0, but expliciting testing the value, as you've shown, would remedy that.
In Section
Seekers of Perl Wisdom
|
|