Your code does not define a sub within a sub, but a sub within a code block.Actually, the sub level1 is defined (and called) within an explicit scope, not within a code block.
Since there are no lexicals also defined within the scope and referred to by the subroutine, the scope has no effect; subroutines themselves are globally scoped.
In reply to Re^2: Defining a sub within a sub: OK?
by AnomalousMonk
in thread Defining a sub within a sub: OK?
by talexb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |