$#lines contains the last index of the array @lines which may or may not be one less than the actual number of elements in the array @lines. To get the actual number of elements of an array you must use the array in scalar context:
print scalar @lines, "\n";
In reply to Re^3: Split Help
by jwkrahn
in thread Split Help
by de2425
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |