push
push ARRAY, LIST
ARRAYの末尾にLISTを追加して、追加後のARRAYの要素数を返します。
サンプルプログラム
@foo = (1, 2, 3);
@bar = (10, 20, 30);
push @foo, @bar;
push @foo, 100;
push @foo, (1000, 2000);
foreach $val (@foo) {
print $val, "\n";
}
関連項目
・配列に値を追加・配列の連結
・スタック
・pop関数
・shift関数
・splice関数
・unshift関数
