@array = qw# dino fred barney #;
$a = shift(@array); # $a gets "dino", @array now has ("fred", "barney")
$b = shift @array; # $b gets "fred", @array now has ("barney")
shift @array; # @array is now empty
$c = shift @array; # $c gets undef, @array is still empty
unshift(@array, 5); # @array now has the one-element list (5)
unshift @array, 4; # @array now has (4, 5);
@others = 1..3;
unshift @array, @others; # @array now has (1, 2, 3, 4, 5)