Help for this page

Select Code to Download


  1. or download this
    sub foo {
        if (defined wantarray) { # we're in scalar or list context
    ...
    # do what you need to do on @_ directly, only thing to maintain
    
    } #foo
    
  2. or download this
    foo( @data );
    
  3. or download this
    @newdata = foo( @olddata );
    
  4. or download this
    @data = foo( qw(foo bar baz) );