|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Why does testing for the existence of hash keys create the keys ?by fshrewsb (Novice) |
| on Oct 08, 2012 at 08:00 UTC ( #997763=perlquestion: print w/ replies, xml ) | Need Help?? |
|
fshrewsb has asked for the
wisdom of the Perl Monks concerning the following question:
This is very simple, but it happens often and I have to write extra code to handle it :
Of course, at the first print $hashref is undef, but after the exists statement $hashref is now: { 'a' => {} } Why ?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||