The construct you see is returning the index of the last element in the array, which is one less than the number of elements in the array.
will print "2".my @array = (1, 2, 3); print $#array, "\n";
In reply to Re: What does $#variable mean?
by pbeckingham
in thread What does $#variable mean?
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |