Help for this page

Select Code to Download


  1. or download this
    sub foo {
        my ( $x, $y, $z ) = @_;
        # ...
    }
    
  2. or download this
    sub say {
        my ( $x, %param ) = @_;
    ...
    }
    
    &say( "Hello", name => "world" );
    
  3. or download this
    sub bar {
        my ( @a, @b ) = @_; # wrong!
    ...
    }
    
    &bar( @array1, @array2 ); # wrong!
    
  4. or download this
    sub bar {
        my ( $a_ref, $b_ref ) = @_; # ok
        # ...
    }
    &bar( \@array1, \@array2 ); # ok