in reply to Re^2: What's wrong with this regex
in thread What's wrong with this regex

Sorry, I don't understand your answer. What exactly is wrong with the approach that uses split?

$_ = '1.2.3.4.5.6 foo bar'; if (/((?:\d+\.)+(\d+)/) { my @matches = (split(/\./, $1), $2) }