Keep It Simple, Stupid | |
PerlMonks |
Re: references changing a hash valueby splinky (Hermit) |
on Apr 26, 2005 at 14:01 UTC ( [id://451575]=note: print w/replies, xml ) | Need Help?? |
$ranimals is a reference to %animals, so they both point at the same thing. So, when you change $$ranimals{'duck'}, you're also changing $animals{'duck'}.
In Section
Seekers of Perl Wisdom
|
|