print $#tt; should probably be print scalar @t; instead.
In reply to Re: Count Using Split by jwkrahn in thread Count Using Split by de2425