Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2016-10-01 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (7 votes). Check out past polls.