About perl closure.

P

pswd

I have little idea about what are closures for perl?
Is it just a function maker that returns a reference of subroutine?

Could anybody tell me what it is and show me some examples?

Thanks in advance!
 
J

John Bokma

pswd said:
I have little idea about what are closures for perl?
Is it just a function maker that returns a reference of subroutine?

Could anybody tell me what it is and show me some examples?

perldoc -q closure
 
X

xhoster

pswd said:
I have little idea about what are closures for perl?
Is it just a function maker that returns a reference of subroutine?

I think the thing that makes a code-ref a "closure" is that any
enclosing-scoped lexical variables appearing in them have their ref-counts
incremented, and thus can't be freed until after the closure itself is
destroyed.
Could anybody tell me what it is and show me some examples?

try perldoc -q closure

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top