New Ways with Arrays
In the following section, we will discuss a set of array functions that make several powerful data structures possible in Perl.
A List as a Stack
Until now, lists (and arrays) have been presented as linear arrangements of data with indexes that make it possible to access each element, as shown here:
Use your imagination for a moment and imagine the array elements piled up vertically with the element having the highest index at the top, as shown here:
Notice that there are no index numbers in this figure. The reason is that ...