in reply to What does $#variable mean?

Scarborough,
That is Perl making your life easy. The intent is to prevent the programmer from having to keep track of indices.
my @array = qw(one two three); my $last_index = $#array; # Index of last element (2) my $last_element = $array[ -1 ]; # Value of last element (three)
And then of course there is push, pop, shift, unshift to make your life easier as well.

Cheers - L~R

Update: Some other helpful things to remember
my $count = @array; # Number of elements (3) $#array = 99; # Extend/Truncate array