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

Re^2: Why is it uninitialized?

by dave_the_m (Monsignor)
on Dec 20, 2017 at 18:53 UTC ( #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.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2019-07-23 00:31 GMT
Find Nodes?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?

    Results (22 votes). Check out past polls.