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"});