Help for this page

Select Code to Download


  1. or download this
    sub map_With_Ref {
        my( $sub )= shift( @_ );
    ...
    print "--- Closure test --\n" ;
    map_With_Closure( \&addten_With_Closure, \@a, \@b, \@c );
    map_With_Closure( sub { print &$_() . "\n" for @_ }, \@a, \@b, \@c );
    
  2. or download this
    ###################
    --Output --
    ...
    21
    24
    27