in reply to Reference to an anon sub from within.

The whole point of a subroutine is to have reusable code or to break something into logical steps. If you're not storing the reference anywhere, what you have isn't a subroutine, it's just code. So, instead of using an anonymous sub, you could write it like so:
{ #your code goes here }
The braces give everything it's own lexical scope, just like a subroutine has.

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

Replies are listed 'Best First'.
Re^2: Reference to an anon sub from within.
by Dedalus (Scribe) on Mar 08, 2005 at 22:53 UTC
    Yes, indeed. *sigh*, you people, TOO helpful. I ask a silly question and you assume I am deluded, and not simply wishing to find a silly answer.