Do you know where your variables are? | |
PerlMonks |
Re: Re: A Real Closureby japhy (Canon) |
on Jul 12, 2001 at 18:41 UTC ( [id://96053]=note: print w/replies, xml ) | Need Help?? |
Err, the warning is due to defining a function (that ends up acting as a closure, due to its use of lexicals defined in an upper scope) inside a function. But if you write:
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. japhy -- Perl and Regex Hacker
In Section
Seekers of Perl Wisdom
|
|