Why don't the docs mention that a named sub can create a closure?
There's a whole section on it called "Persistent variables with closures".
Could someone give a blow by blow description of what's happening?
In short, named subs capture at compile time.
You seem to believe that subs are scoped to the block that contain them. That's not true. Subs are global.
In reply to Re: closure clarity, please
by ikegami
in thread closure clarity, please
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |