Perl provides many functions to manipulate and access arrays. These functions makes it very easy to use perl arrays as stacks or queue's. Some of these functions are given below:
POP:
pop function will remove and return last element of perl arrays. So, this can be used to remove element from stack if array is getting used as stack. pop function will return undef if array is empty