P is for Practical | |
PerlMonks |
RE: RE (tilly) 3 (closures): for loopsby BlaisePascal (Monk) |
on Aug 21, 2000 at 00:55 UTC ( [id://28741]=note: print w/replies, xml ) | Need Help?? |
if I understand correctly, what you are saying is that:
is (roughly) equivilant, scope-wise, to: In the second case, it is abundantly clear that the $i captured by the closure is different for each iteration, and is an alias for the underlying array element.
In Section
Seekers of Perl Wisdom
|
|