Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to call a sub-routine ref

by blue_cowdawg (Monsignor)
on Oct 19, 2012 at 18:34 UTC ( #1000012=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    | stuff before
    ...
    my $sref = \&foo 
    
    | stuff after
    
  2. or download this
    
    | later
    ...
    &($sref)( arg1....argn);
    
    |
    
  3. or download this
    #!/usr/bin/perl -w
    
    ...
            print "This is foo.\n";
    }