Better, and clearer, to write for line 7:
my $count = $#array; print "number of elements is " . ++$count . "\n";
In reply to Re^3: Printing the length of an array ?
by ww
in thread Printing the length of an array ?
by jflevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |