But it's supposed to be file-scoped. $i is scoped to the file in the OP's code. Your suggested change would make the code different than the OP's code.
In reply to Re^3: Closures and scope of lexicals
by ikegami
in thread Closures and scope of lexicals
by haj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |