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

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: pipe Chapter 5
Function Reference
Next: Reference: pos
 

pop

pop @
array

Treats an array like a stack, popping and returning the last value of the array, shortening the array by one element. If array is omitted, the function pops @ARGV (in the main program), or @_ (in subroutines).

If there are no elements in the array, pop returns the undefined value. See also push and shift . If you want to pop more than one element, use splice .


Previous: Reference: pipe Perl in a Nutshell Next: Reference: pos
Reference: pipe Book Index Reference: pos

Library Navigation Links

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