in reply to pop an array

Like they said, you want reverse.

It took me ages to advance from $#listofitems+1 .... there's a better way: $#arrayname is the index of the last element. C/Java/Pascal programmers do everything based on that. But if what you want is the number of elements in the array, use

scalar @arrayname
.

--
TTTATCGGTCGTTATATAGATGTTTGCA