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


in reply to Re: output differs in perl version
in thread output differs in perl version

But you always can implement the algorithm in a way that does work in 5.8.8. For example like this:
while ( $str1 =~ /^(\S+\s+)(\S+\s+\S+)(.*)$/ ) { print "$1$2\n"; $str1 = "$2$3"; $n++; }

Alternatively, you could use $' (${^POSTMATCH} doesn't work in 5.8.8):
while ( $str1 =~ /^(\S+\s+)(\S+\s+\S+)/ ) { print "$1$2\n"; $str1 = "$2$'"; $n++; }