There's always perlfunc...
splice takes an array for the first argument, and then removes 3rd argument elements from the 2nd argument and on, replacing them with the list in the 4th - inf argument, and returning the extracted list.
my @array = qw(i do not like carrot);
print "@array\n"; # you know;
my @carrot = splice(@array,2,3,(qw(mow the lawn)));
print "@array but @carrot\n";
-nuffin
zz zZ Z Z #!perl