in reply to Re: Defining a sub within a sub: OK?
in thread Defining a sub within a sub: OK?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Defining a sub within a sub: OK?
by jwkrahn (Abbot) on Oct 14, 2009 at 22:12 UTC | |
by AnomalousMonk (Archbishop) on Oct 14, 2009 at 22:50 UTC |