Syntactic Confectionery Delight | |
PerlMonks |
Re: Lexical scoping like a foxby dingus (Friar) |
on Nov 19, 2002 at 09:17 UTC ( [id://214061]=note: print w/replies, xml ) | Need Help?? |
To follow up on Elian's comment about the misleading description of "destruction". This is an area that has always confused (and contused) me. I think you could try adding this snippet to your nested lexical scope example and then things will become clearer:
What this snippet shows is that the inner $foo remains defined to the subroutine in the inner scope even though the program has passed on through it and down to the other scopes. You could mention that this is a bit like a C static if you want ... Note: numerous puns about finding one's inner $elf are undoubtedly available if required Dingus Enter any 47-digit prime number to continue.
In Section
Meditations
|
|