in reply to what does shift do?

See shift :-)

Update: From perlfunc:shift...

Shifts the first value of the array off and returns it, shortening the array by 1 and moving everything down.

Is that what you're looking for, or have I missed the mark completely?