"be consistent" | |
PerlMonks |
Re^2: Are we seeing syntax inconsistency?by Ovid (Cardinal) |
on Nov 11, 2005 at 05:11 UTC ( [id://507633]=note: print w/replies, xml ) | Need Help?? |
foreach has to create a fresh variable every time. Otherwise, when you keep a reference to one (as with the anonymous subroutine), they would all hold the same value every time a new value was assigned in the loop. (And thanks to Animator for clearing up my sloppy wording on this) Cheers, New address of my CGI Course.
In Section
Seekers of Perl Wisdom
|
|