Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Real life uses for closures.

by ikegami (Pope)
on Feb 14, 2013 at 08:09 UTC ( #1018698=note: print w/replies, xml ) Need Help??

in reply to Real life uses for closures.

Technically, f is a closure which captures $constant:
package Module; my $constant = 'foo'; sub f { ... $constant ... } 1;

Given your mention of state, this is probably not quite what you had in mind when you mentioned "simple C-style 'static' storage".

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018698]
[jdporter]: I for one think it's kind of ridiculous that people can't ask - here - other people for help just because it involves monetary compensation.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2017-03-23 01:04 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (278 votes). Check out past polls.