start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: setsockopt Chapter 5
Function Reference
Next: Reference: shmctl
 

shift

shift @
array

Removes the first value of @array and returns it, shortening the array by 1 and moving everything down. If there are no elements in the array, the function returns the undefined value. If @array is omitted, the function shifts @ARGV (in the main program), or @_ (in subroutines). See also unshift , push , pop , and splice . The shift and unshift functions do the same thing to the left end of an array that pop and push do to the right end.


Previous: Reference: setsockopt Perl in a Nutshell Next: Reference: shmctl
Reference: setsockopt Book Index Reference: shmctl

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.