http://qs1969.pair.com?node_id=1006873


in reply to Re: Last index use in array slice
in thread Last index use in array slice

Alternatively, yet still using the idea of discarding part of the output:
my(undef, undef, @rest) = split/\n/;
But, with a variable value for $index, I'd rather go the splice route.