Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Why are closures cool, continued?

by perrin (Chancellor)
on Jan 19, 2002 at 06:36 UTC ( #140031=note: print w/ replies, xml ) Need Help??


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

Closure and anonymous sub -- two totally different things! An anonymous sub is a ref to a sub without a name. A closure is any sub (named or not) that refers to lexical variables defined outside of its scope.


Comment on Re: Re: Why are closures cool, continued?
Re:x3 Why are closures cool, continued?
by grinder (Bishop) on Jan 19, 2002 at 18:27 UTC
    Nearly. An anonymous sub is a sub without a name that can only be accessed via a reference (to that sub).

    --
    g r i n d e r
    print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://140031]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2015-07-06 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls