(computing, programming)

Pop means removing and returning the top element of a stack. See the opposite push for an example.


Perl function:
pop @array

Removes and returns the last element of @array, reducing its length by 1. If @array contains no elements, the undefined value is returned.

If no argument is given, pop affects @ARGV (in the main program) or @_ (in a subroutine).

See also push, shift and unshift.

Back to Perl