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