Where does the contents of $guess come from? If it's input from the user via the keyboard, or from a file, it's likely to have a newline after it. Try matching using $guess eq "$correct[$i]\n" or chomp your input before comparing.
In reply to Re: Control Structure problem, mistake can't be found
by FunkyMonk
in thread Control Structure problem, mistake can't be found
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |