Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 studying the Monastery: (8)
As of 2014-12-25 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls