Internal variable $. could be used instead of $counter. Internal variable $_ could be used in lieu of $line. The print isn't needed after you determine the split worked properly.
In reply to Re: counting unique elements of an array
by apl
in thread counting unique elements of an array
by mmittiga17
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |