The refcnt is 2 in the first dump and 5 in the second. Why?perl -wle'use Devel::Peek; { my $f; $f = sub { my $c = shift; print $c +; $f->($c-1) if $c }; Dump $f; $f->(3); Dump $f }'
In reply to Re^6: private recursive subroutines
by ysth
in thread private recursive subroutines
by Sixtease
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |