Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Why is it uninitialized?

by dave_the_m (Monsignor)
on Dec 20, 2017 at 18:53 UTC ( [id://1205933]=note: print w/replies, xml ) Need Help??


in reply to Re: Why is it uninitialized?
in thread Why is it uninitialized?

something akin to a closure (except it's not anonymous)
In perl, a closure doesn't have to be an anonymous sub; any sub that uses lexical variables which are declared in a scope outside that sub, closes over those vars at the time the sub is created. Anonymous subs are usually more interesting, since multiple instances of the sub are often created at runtime, thus capturing multiple instances of outer lexicals. Conversely, named subs are created just once, at compile time, thus just capturing the first instance of each lexical.

Dave.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found