http://www.perlmonks.org?node_id=64218


in reply to Re: Counting number of characters in a string
in thread Counting number of characters in a string

How about:
print scalar @Chars;
instead of:
print ++$#Chars;
Then you won't modify the array size.

--sacked