Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Dynamically building a hash of hashesby willdooUK (Beadle) |
on Jul 12, 2001 at 16:09 UTC ( [id://95993]=perlquestion: print w/replies, xml ) | Need Help?? |
willdooUK has asked for the wisdom of the Perl Monks concerning the following question:
Apologies if this is going over old ground, but I can't find the answer to this in the archives. I'm trying to dynamically build a hash of hashes, but I can't seem to get the context right. Here's the test code I'm working on: What I want is for the %new_attrs hash to be loaded with the hash that I put into %container, but it only wants to give me a garbage reference. If I try the line like this: ... I get nothing out at the end (other than a Can't use string ("1/8") as a HASH ref while "strict refs" error if strict is in use). Any help would be much appreciated. willdooUK -------------- "Home is a castle you built in my mind; I'm home anywhere, anytime." Donny Hathaway
Back to
Seekers of Perl Wisdom
|
|