pop() function in Perl returns the last element of Array passed to it as an argument, removing that value from the array. Note that the value passed to it must explicitly be an array, not a list.
undef if list is empty else last element from the array.
Popped element is 40 Resultant array after pop(): 10 20 30
Popped element is Best Resultant array after pop(): Geeks For Geeks
- Perl | Useful Array functions
- Perl | Array Slices
- Perl | Reverse an array
- Perl | exp Function
- Perl | each() Function
- Perl | int() function
- Perl | tell() Function
- Perl | abs() function
- Perl | chr() Function
- Perl | hex Function
- Perl | oct() Function
- Perl | uc() Function
- Perl | log() Function
- Perl | cos() Function
- Perl | sin() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.