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

Re^3: Initialization of "local static" (style question)

by massa (Hermit)
on Feb 03, 2009 at 12:13 UTC ( [id://740967]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Initialization of "local static" (style question)
in thread Initialization of "local static" (style question)

One option would be to use closures.
## DOC: returns a function that does that and that. sub ff { my $myval=myfunc(); ... sub { g(++$myval) } } ... my $f = ff; ... my $x = $f->();
[]s, HTH, Massa (κς,πμ,πλ)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-18 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found