I think what you want is $size = $#nums;Probably not. $#nums is the index of the last item in the array @nums. In the usual case, that is one less than scalar(@nums), which gives you the size of the @nums array, not the index of the last element.
--MidLifeXis
In reply to Re^5: Help with arrays
by MidLifeXis
in thread Help with arrays
by perlguru22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |