sub split_array_in_two { my @x = @_; my @second = splice @x, @x/2; \@x, \@second; }