- pop ARRAY
- pop
-
Pops and returns the last value of the array, shortening the array by one element.
配列の最後の値をポップして返し、配列の大きさを 1 だけ小さくします。
Returns the undefined value if the array is empty, although this may also happen at other times. If ARRAY is omitted, pops the
@ARGV
array in the main program, but the@_
array in subroutines, just likeshift
.指定された配列に要素がなければ未定義値が返されますが、 しかしこれは他の場合にも起こり得ます。 ARRAY が省略されると、
shift
と同様に、メインプログラムでは@ARGV
が使われますが、 サブルーチンでは@_
が使われます。Starting with Perl 5.14, an experimental feature allowed
pop
to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.Perl 5.14 から、
pop
がスカラ式を取ることが出来るという 実験的機能がありました。 この実験は失敗と見なされ、Perl 5.24 で削除されました。