pop
pop @array
- Treats an array like a stack, popping and returning the last value of the array, shortening the array by one element. If array is omitted, the function pops
@ARGV(in the main program), or@_(in subroutines).If there are no elements in the array,
popreturns the undefined value. See alsopushandshift. If you want to pop more than one element, usesplice.