Home
Perl
Array
CGI
Class
Data Type
Database
File
GUI
Hash
Language Basics
Network
Regular Expression
Report
Statement
String
Subroutine
System Functions
Win32
XML
Menu
$s = pop @{[@a]}; : pop « Array « Perl
Perl
Array
pop
$s = pop @{[@a]};
@a = (1, 2, 3); $s = pop @{[@a]}; print
"@a\n"
;
Related examples in the same category
1.
Paper Stacks
2.
The pop function pops off the last element of an array and returns it.
3.
Pop value out of array
4.
Push, pop, shift and unshift an array
5.
Using Pop to remove element from an array