in reply to Control Structure problem, mistake can't be found

One more tip for how to debug this kind of thing....

After you set $guess (whether you read it from STDIN or not), but before the line

if ($guess eq $correct[$i])
you can see what the value of $guess is by doing
print "[$guess]";
Note the square brackets ( [ and ] ). They are important here because they show where the value starts and ends. So if the value of $guess is Yellow\n, you get
[Yellow ]
and you see clearly that you have a \n at the end (which you may not want).