But why do you want nested subs in the first place? You're not making closures, right? One common way to get "private" helper subs in your module is:
sub something_useful { my $x = _helper(shift); return $x; } sub _helper { ... }
One major advantage is in testing: the helper subs can be called directly.
In reply to Re: Memory efficiency, anonymous vs named's vs local subroutines
by Anonymous Monk
in thread Memory efficiency, anonymous vs named's vs local subroutines
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |