my $x = "the the quick brown fox";
my @matched;

if (@matched = $x =~ /(\w+) (\w+)/, $matched[0] eq $matched[1]) {
    print "Double word starts the string\n";
}
else {
    print "Failed, words are: @matched\n";
}
