http://qs321.pair.com?node_id=153318


in reply to regex capturing problem

I suppose that if you really wanted to use a non-split solution, you could try something like this:

#in scalar context: my @words =(); push @words, $1 while $word =~ /(\w+'?)/g; #in list context: my @words = ( $word =~ /(\w+'?)/g );