in reply to Re: why need my in a foreach loop?
in thread why need my in a foreach loop?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: why need my in a foreach loop?
by szabgab (Priest) on Nov 28, 2010 at 18:37 UTC | |
by ikegami (Patriarch) on Nov 28, 2010 at 18:52 UTC | |
by szabgab (Priest) on Dec 08, 2010 at 06:11 UTC | |
by LanX (Saint) on Dec 08, 2010 at 13:00 UTC |
In Section
Seekers of Perl Wisdom