in reply to Re: How to split a string (an explanation of why you wanted an array)
in thread How to split a string

One thing you don't mention, and an important reason to use logically grouping constructs like arrays, is that it's much harder to iterate over the group of values. In Perl at least you can write

foreach ( $f0, $f1, $f2, $f3, $f4, $f5 ) { # ... }

but in other languages it takes an incredible amount of teeth gnashing to do something like that. And even so, it is annoying to write out every time, invites typos, invites copy-paste, and is annoying to read.

Makeshifts last the longest.

  • Comment on Re^2: How to split a string (an explanation of why you wanted an array)
  • Download Code