=over =item shift ARRAY X =item shift 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 ARRAY is omitted, shifts the L|perlvar/@_> array within the lexical scope of subroutines and formats, and the L|perlvar/@ARGV> array outside a subroutine and also within the lexical scopes established by the C, C, C, C, C, and C constructs. Starting with Perl 5.14, an experimental feature allowed L|/shift ARRAY> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24. See also L|/unshift ARRAY,LIST>, L|/push ARRAY,LIST>, and L|/pop ARRAY>. L|/shift ARRAY> and L|/unshift ARRAY,LIST> do the same thing to the left end of an array that L|/pop ARRAY> and L|/push ARRAY,LIST> do to the right end. =back