in reply to Re^4: How do closures and variable scope (my,our,local) interact in perl?
in thread How do closures and variable scope (my,our,local) interact in perl?
There are some extra phenomenons complicating and maybe explaining it ...
1. The loop-variable is an alias to the current list element
2. Normally there is no local() for lexvars, maybe they needed to implement a work-around.
My guess is, the programmers decided to implement this "local(lexical loop-var)" by associating it temporarily to the loops lexpad.
This might warrant some mention in the documentation.
definitely!
Cheers Rolf
UPDATE: deleted wrong passage...
|
|---|