This provides a way to access array elements by subscript. This variable always contains the subscript of the last element in the array. In fact, if you know an array is going to grow very large quickly, you probably want to set this variable to a very high value. Sometimes, you may want to create a new array based on some subset of elements from another array. To do this, you use a slice.
Slices use a subscript that is itself a list of integers to grab a list of elements from an array.
This can be a very useful feature for array manipulation. Functions Perl also provides quite a few functions that operate on arrays. As you learn more and more Perl, you will see lots of interesting functions that work with arrays. This attitude is seen in Perl through the push and pop functions. You can build a queue in Perl by using the unshift and pop functions together.