http://www.perlmonks.org?node_id=140003


in reply to Re: (jeffa) Re: Why are closures cool, continued?
in thread Why are closures cool, continued?

Hey! I was thinking something along those lines, just because the variables themselves are not declared -within- the closure ... only near it?

I am thinking this means:
1) There is no spoon, I mean closure.
2) That's a closure, but not an academic example of a closure.
3) Mr. Dunstan, you are mincing words to gain karma.

Zuh? -mr.dunstan
  • Comment on Re: Re: (jeffa) Re: Why are closures cool, continued?

Replies are listed 'Best First'.
Re: Re: Re: (jeffa) Re: Why are closures cool, continued?
by perrin (Chancellor) on Jan 19, 2002 at 03:56 UTC
    Sort of. To make a closure, you have to refer to lexical variables that are declared outside of the scope of the current sub. That's the definition of a closure.