perlfunc
gods
<P>
shift - remove the first element of an array, and return it
<P>
<HR>
<P>
shift
<FONT SIZE=-1>ARRAY</FONT>
<P>
shift
<P>
<HR>
<P>
Shifts the first value of the array off and returns it, shortening the array by 1 and moving everything down. If there are no elements in the array, returns the undefined value. If
<FONT SIZE=-1>ARRAY</FONT> is omitted, shifts the
<CODE>@_</CODE> array within the lexical scope of subroutines and formats, and the
<CODE>@ARGV</CODE> array at file scopes or within the lexical scopes established by the [perlfunc:eval|eval ''], <CODE>BEGIN {}</CODE>, <CODE>END {}</CODE>, and <CODE>INIT {}</CODE> constructs. See also [perlfunc:unshift|unshift()], [perlfunc:push|push()], and [perlfunc:pop|pop()]. <CODE>Shift()</CODE> and [perlfunc:unshift|unshift()] do the same thing to the left end of an array that [perlfunc:pop|pop()] and [perlfunc:push|push()] do to the right end.
<HR>