Help for this page

Select Code to Download


  1. or download this
    sub foo {
        my @files;
    ...
    
    print join ' ', foo(123, 456);       # prints '123 456'.
    print join ' ', foo('abc', 'def');   # prints nothing.
    
  2. or download this
    my @files;
    sub foo {
    ...
    
    foo('abc', 'def');
    print join ' ', @files; # '123 456 abc def'
    
  3. or download this
    sub foo {
        @files = ();
    ...
        shift;
        foo(@_) if @_;
    }
    
  4. or download this
    sub foo {
        my @files;
    ...
    
    print join ' ', foo(123, 456);       # '123 456'
    print join ' ', foo('abc', 'def');   # 'abc def'
    
  5. or download this
    sub foo {
        my @files;
    ...
    
    print join ' ', foo(123, 456);       # '123 456 456'
    print join ' ', foo('abc', 'def');   # 'abc def def'