Help for this page
use strict; use warnings; ... my @pairs = $s =~ /(?=(\w+ \s+ \w+))\w+ \s+/gx; print join "\n", @pairs;
This is is a a test
... my @pairs = map [split], $s =~ /(?=(\w+ \s+ \w+))\w+ \s+/gx; print "@$_\n" for @pairs;