good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: Hash of hashes syntaxby Chmrr (Vicar) |
on Mar 19, 2003 at 09:24 UTC ( [id://244298]=note: print w/replies, xml ) | Need Help?? |
Good eye, but this actually isn't a problem in this case. Because of the my %h inside of the loop, %h is a different (and new) lexical through each iteration -- thus there is no problem just sticking a reference to it into the hash or array. The problem comes from code like this (nearly directly copied from perldsc):
Note where the "my" is. See perldsc or perlreftut or perllol for more. perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'
In Section
Seekers of Perl Wisdom
|
|