laziness, impatience, and hubris | |
PerlMonks |
RE: Answer: how do I use a hash of hashes reference in a function ?by Fastolfe (Vicar) |
on Sep 22, 2000 at 23:45 UTC ( [id://33689]=note: print w/replies, xml ) | Need Help?? |
Just for clarification (for the original poster), your syntax:
*replaces* the reference in $hashref{name} with a new one, composed of your data1 => "moredata" hash. That's why it won't work. merlyn is correct in that if you wish to modify the hash referenced by $hashref{name} you don't do that by setting $hashref{name}, you modify it as if it were a hash: $hashref{key}{subkey} = $xyz;
In Section
Seekers of Perl Wisdom
|
|