Help for this page

Select Code to Download


  1. or download this
    sub { ++$_ for @_ }->(my @arr = 'a' .. 'c'); print "@arr";
    # Output: b c d
    
  2. or download this
    sub reverseArray {
        my @arr = @_;
    ...
            @{ $arr[$i] } = reverse @{ $arr[$i] };
        }
    }
    
  3. or download this
    sub reverseArray {
        my @arr = @_;
    ...
            $arr[$i] = [ reverse @{ $arr[$i] } ];
        }
    }