Help for this page

Select Code to Download


  1. or download this
    sub split_array_in_two { ([splice @_, @_/2], \@_)[1,0] }
    
  2. or download this
    sub split_array_in_two { my $l=@_/2; [@_[0..$l-1]], [@_[$l..$#_]] }
    
  3. or download this
    sub da (\@\@\@) {
      my ($s, $a, $b)=@_;
    ...
    my @s=1..7;
    da(@s, @a, @b);
    print "@a - @b\n"