Today I have encountered a problem that required me to determine the maximum index of an array in perl. I used to do it this way:
my @array = (1, 2, 3); print $
The use is mentioned in first example in perldata. It denotes index of last item in the array.
Btw, you can also use
$array[-1]
to get last item.