Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    sub foo { print "bar\n" }
    ...
    my $func_ref = \&{$func};
    
    $func_ref->();
    
  2. or download this
    sub AUTOLOAD {
        # get params and function
        # ...
    ...
        my $func_ref = \&{$func};
        goto &{$func_ref};
    }