Array indices in Perl start with 0. You are incrementing $i before you use it as an index to check the first answer. So the "correct" answer to the first question you ask should be "Moonlight Mile" ... ;-)$i++; if ($guess eq $correct[$i]) { # if guess is correct, reply
In reply to Re^3: Control Structure problem, mistake can't be found
by broomduster
in thread Control Structure problem, mistake can't be found
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |