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