my $x = "the the quick brown fox";
my @matched = split(/ /,$x);  #split between words

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