note
Chmrr
<p>Good eye, but this actually isn't a problem in this case. Because of the <code>my %h</code> 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 [http://perldoc.com/perl5.8.0/pod/perldsc.html|perldsc]):</p>
<code>my %hash;
for $i (1..10) {
%hash = somefunc($i);
$hash_of_hashes{$rn} = \%hash; # WRONG!
}</code>
<p>Note where the "my" is. See [http://perldoc.com/perl5.8.0/pod/perldsc.html|perldsc] or [http://perldoc.com/perl5.8.0/pod/perlreftut.html|perlreftut] or [http://perldoc.com/perl5.8.0/pod/perllol|perllol] for more.</p>
<p>perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'</p>
244265
244284