Explicitly returning empty array references is unnecessary, since an empty argument list will give you that anyway.sub split_array_in_two { my @x = @_; my @second = splice @x, @x/2; \@x, \@second; }
After Compline,
Zaxo
In reply to Re: split an array in two
by Zaxo
in thread split an array in two
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |