Help for this page
my $first = "the"; my $last = "dog"; my $string = "The black dog danced around the sleeping dog." my @matches = $string =~ m/\b($first\b(?!.*?$first.*?)\b$last)\b/g;
my $first = "the"; my $last = "dog"; ... # The black dog # the sleeping dog # the lazy dog