You're talking of the scope of the variables now, not the scope of the sub. Yes, they are visible to the sub. We gave a number of examples of this. You can't have closures without this.
No, I don't think I am. It matters where the sub is defined. Saying that a sub is global, end of discussion is not at all helpful in determining what variables a sub can see. Clearly, it matters where a sub is defined in determining what values it can see.
A sub defined outside any blocks cannot see a my variable declared inside a block, yet if the sub is defined inside the block, it can see the my variable. The scope of the my variable is the same in both cases. I don't see how saying that the scope of a variable is "wherever it can be seen" is of any use. The goal is to determine where a variable can be seen.
In reply to Re^3: closure clarity, please
by 7stud
in thread closure clarity, please
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |