If you want a truly local sub, your best bet is probably to build a closure
Just a bit of clarification, a closure is not strictly necessary. What he wants is a lexically scoped, anonymous subroutine -- which is what you've demonstrated here. Whether that subroutine creates a closure is beside the point.
In reply to Re^2: Is it possible to create a sub exclusive to a sub?
by revdiablo
in thread Is it possible to create a sub exclusive to a sub?
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |