in reply to Re: Is it possible to create a sub exclusive to a sub?
in thread Is it possible to create a sub exclusive to a sub?
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.
|
---|