# pop ## Synopsis ```perl my $val = pop @array; pop @array; # discard removed element ``` ## Description 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. ## See also push, shift, unshift, splice