I must disagree. Having two variables or functions with the same name in the same scope is a bad idea.
There is no big point for using nested subs if they are not completely encapsulated
Some encapsulation is better than no encapsulation. The extra complications are not needed. Even with the extra complications, it's still not completely encapsulated.
# No Memory Leak!
You haven't changed anything. $inner still refers to the sub. The sub still captures $inner if the helper was recursive. The potential for a memory leak hasn't changed at all. You made it more complex for no gain.Eventually, $inner will be assigned a new value and stop referring to the helper. Nevermind.
In reply to Re^7: sub fuction inside sub functioin?
by ikegami
in thread sub fuction inside sub functioin?
by deewanagan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |