Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Closure Explanation

by runrig (Abbot)
on Apr 30, 2010 at 20:37 UTC ( #837846=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    sub rtn_closure {
    ...
    print $g->(), "\n"; # Prints 10
    print $g->(), "\n"; # Prints 11
    print $f->(), "\n"; # Prints 7
    
  2. or download this
    
    sub exec_callback {
    ...
    }
    
    exec_callback(sub {print "hello\n"});
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://837846]
help
Chatterbox?
[Discipulus]: which node yesterday?
[Discipulus]: i cannot see any link to tye post..
[Lady_Aleena]: Hello.
[marto]: teleconf + coffee, I'll post it in a few mins
[beech]: fencepost?
beech is protected with velcro

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-06-23 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (538 votes). Check out past polls.