Help for this page

Select Code to Download


  1. or download this
    sub testit{ print 'hi' };;
    
    sub doit (\&) { $_[0]->() };;
    ...
    my $codeRef = \&testit;;
    
    doit( &$codeRef );
    
  2. or download this
    sub doit2 (&) { $_[0]->() };
    
    doit2( sub { print 'hi2' });