Help for this page

Select Code to Download


  1. or download this
    sub sub1 { print "sub1 ran, got args: [@_]\n" }
    sub sub2 { print "sub2 ran, got args: [@_]\n" }
    ...
        sub { sub2('some', 'string') },
    );
    $_->() foreach @refs;
    
  2. or download this
    sub foo { print "Got args: [@_]\n" }
    
    ...
    foreach my $arg_ref (@args) {
        foo(@$arg_ref)
    }