while ($str = ) {
my @p = (0xFFFFFFFF, 0xFFFFFFFF);
my $i = 0;
while ($str =~ /(\w+)/g) {
if ($1 eq 'decision') {$p[0] = $i; if (abs($p[0] - $p[1]) <= 6){print "matched\n"; last;}}
elsif ($1 eq 'McMillon') {$p[1] = $i; if (abs($p[0] - $p[1]) <= 6){print "matched\n"; last;}}
$i++;
}
}
__DATA__
Walmart chief executive Douglas McMillon defends company's decision to invest billions in improving its stores and Internet shopping presence。