Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Heisenberg Uncertainty Hashby japhy (Canon) |
on Apr 26, 2005 at 22:48 UTC ( [id://451792]=note: print w/replies, xml ) | Need Help?? |
You're being bitten by "autovivification". When you check to see if $hash{d}{value} exists, Perl will autovivify $hash{d} if it doesn't already exist.
Your best solution is to do if ($hash{d} and !$hash{d}{value}) { ... }.
In Section
Seekers of Perl Wisdom
|
|