Then $x is private to &count, and because &count refers to a lexical that "should" have "gone away", it is a closure. At least, that is what I have understood from Randal.{ my $x; sub count { ++$x } }
In reply to Re: Re: A Real Closure
by japhy
in thread Unusual Closure Behaviour
by tachyon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |