in reply to Re^2: why need my in a foreach loop?
in thread why need my in a foreach loop?
the subroutine is a closure
Backwards. It works because the subroutine doesn't capture package variables. If you switched our for my in my snippet, you'd have a closure, and you'd get a different result.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: why need my in a foreach loop?
by 7stud (Deacon) on Dec 02, 2010 at 03:46 UTC | |
by ikegami (Patriarch) on Dec 02, 2010 at 16:38 UTC |