Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Ok, that explains it, but I don't quite get the rationale for doing it this way...
If I wanted a localized variable I write the loop as "for my $j (...)". If I explicitly use "for $i" I make clear my intention of using a previously introduced variable. Why perl then insists on knowing better and localizing it is counter-intuitive to me and at the moment I don't see any reason why it should be implemented like that (but there probably is one)... In reply to Re^2: loop surprise
by morgon
|
|