Help for this page

Select Code to Download


  1. or download this
        sub foo($$);
    
  2. or download this
        sub foo($$);
        sub bar;
    
        bar "arg1", foo "arg2", "arg3", "arg4";
    
  3. or download this
        bar("arg1", foo("arg2", "arg3"), "arg4");
    
  4. or download this
        sub foo ($$);
        my @args = ("arg1", "arg2");
        foo @args;
    
  5. or download this
        sub foo();           # Sub takes no arguments.
        sub foo($);          # Sub takes one argument.
        sub foo(&@);         # First argument is a block.
        sub foo(\@@);        # First argument will be reffed.
    
  6. or download this
        sub bar;
        sub foo($);
    
        bar "arg1", foo "arg2", "arg3";