Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

perlfunc:pop

by gods
on Aug 24, 1999 at 22:42 UTC ( #206=perlfunc: print w/replies, xml ) Need Help??

pop

See the current Perl documentation for pop.

Here is our local, out-dated (pre-5.6) version:


pop - remove the last element from an array and return it



pop ARRAY

pop



Pops and returns the last value of the array, shortening the array by 1. Has a similar effect to

    $tmp = $ARRAY[$#ARRAY--];

If there are no elements in the array, returns the undefined value. If ARRAY is omitted, pops the @ARGV array in the main program, and the @_ array in subroutines, just like shift().


Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[choroba]: What a pity.
[erix]: Prague is a beautiful city - -if only I were younger :)
[choroba]: We don't impose an age limit ;-)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2017-06-29 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (658 votes). Check out past polls.