in reply to Array index move into another array

When you say index, I think you mean element (I hope). In which case splice is the function you need:
my @old_array = 1..5; my @new_array = splice @old_array, 2, 2;

leaves @old_array containing (1, 2, 5) and @new_array has (3, 4).

Replies are listed 'Best First'.
Re^2: Array index move into another array
by rose (Beadle) on Apr 17, 2009 at 13:16 UTC

    This is what I expected.

    Thanks a lot !!