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


in reply to Re^3: Counting the number of items returned by split without using a named array
in thread Counting the number of items returned by split without using a named array

I know. My entire point was not to maintain a counter manually a' la

++$cnt while $str =~ /\s+/g;

Well done to point out about \S anyway, since one often forgets about \S, \D and \W.