in reply to split every second word
Not that it helps your particular problem (besides, I think you've been adequately answered), but this would be easy to implement using perl 6 in terms similar to how you framed your question:
@names = split m:each:2nd/\s+/, $string;
I.e., split the $string on each 2nd occurence of one or more whitespace characters.
|
|---|