|
|
| Think about Loose Coupling | |
| PerlMonks |
Re^2: why need my in a foreach loop?by ikegami (Pope) |
| on Nov 28, 2010 at 08:22 UTC ( #874085=note: print w/ replies, xml ) | Need Help?? |
|
The OP points out that there's no real difference between for $lex (...) and for my $lex (...). The "my" is just useless noise. As such, the declaration could be implicit. It's reasonable, but it's not true because foreach loops don't just work with lexicals.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||