Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

pop

Removes and returns the last element of an array.

Removes the last element from the array and returns it. If the array is empty, returns undef. The array shrinks by one element.

Synopsis

my $val = pop @array;
pop @array;              # discard removed element

See Also

push, shift, unshift, splice