As suggested by Anonymonk, warnings show that using your @indexes unaltered means you are trying to access a element off the end of @arr.
johngg@shiraz:~/perl/Monks$ perl -Mstrict -Mwarnings -E '
my @arr = qw{ zero one two three four };
my @idx = ( 0 .. $#arr );
my $one = splice @arr, 1, 1;
say $one;
say join q{ }, @arr;
say join q{ }, @idx;
say join q{ }, @arr[ @idx ];
pop @idx;
say join q{ }, @idx;
say join q{ }, @arr[ @idx ];'
one
zero two three four
0 1 2 3 4
Use of uninitialized value in join or string at -e line 8.
zero two three four
0 1 2 3
zero two three four
I hope this is helpful.
Update: Expanded example with more descriptive output.
johngg@shiraz:~/perl/Monks$ perl -Mstrict -Mwarnings -E '
my @arr = qw{ zero one two three four };
say qq{\@arr before splice : @arr};
my @idx = ( 0 .. $#arr );
say qq{Original \@idx : @idx};
my $one = splice @arr, 1, 1;
say qq{\$one from splice : $one};
say qq{\@arr after splice : @arr};
say qq{\@arr bad slice : @arr[ @idx ]};
my @newidx = ( 0 .. $#arr );
say qq{New \@newidx : @newidx};
say qq{\@arr good slice : @arr[ @newidx ]};'
@arr before splice : zero one two three four
Original @idx : 0 1 2 3 4
$one from splice : one
@arr after splice : zero two three four
Use of uninitialized value in join or string at -e line 9.
@arr bad slice : zero two three four
New @newidx : 0 1 2 3
@arr good slice : zero two three four