![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Setting a hash element to a anoymous hashby Belgarion (Chaplain) |
on May 18, 2004 at 21:00 UTC ( #354438=note: print w/replies, xml ) | Need Help?? |
I believe when the following code executes:
it's overwriting the previously stored hashref. In other words, you're not appending the new information, but replacing the old. You could use something like this:
to add the new information to the end. This will dereference the previous hashref before adding the new code. Update Fixed the code to use an assignment. Also, see kvale's comment below.
In Section
Seekers of Perl Wisdom
|
|