Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Strange HASH reference BUG! Dual value for a key with sub-key!by djantzen (Priest) |
on May 21, 2003 at 06:45 UTC ( [id://259654]=note: print w/replies, xml ) | Need Help?? |
You're inadvertently creating a symbolic reference by using the string 'k1' as a hash. Using the 'V' option under the perl debugger you'll see something like the following (Note: I removed the my declaration so the original hash would show up in the symbol table) :
Just one more reason to use strict :) Note as well that it doesn't matter if it's a hash or hashref.
"The dead do not recognize context" -- Kai, Lexx
In Section
Seekers of Perl Wisdom
|
|