Push and Pop
To add or remove an item from the “high” (right) side of the array, use push or pop.
Shift and Unshift
To do the same at the “low” (left) side use shift and unshift.
Reverse and Chomp
You can reverse the items in an array with the reverse function.
The chomp function will remove the last record separator of each element.