Arrays - Assignment You may assign to arrays using list notation or by using the array access functions: # Add a 4 to the end of @bar push(@bar, 4); # (4, "cat", 4) # Remove it and assign it to $foo $foo = pop(@bar); # Add a 4 to the front of @bar unshift(@bar, 4); # (4, 4, "cat") # Again, remove it and assign it to $foo $foo = shift(@bar);