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


in reply to Re^2: 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

Although this may occasionally work for you in this circumstance, it's not logical to modify the original string just to count the number of occurrences. Just use /\S+/g instead.

  • Comment on Re^3: Counting the number of items returned by split without using a named array
  • Download Code