my $correct; if ($response eq 'q') { $quit = 1; } elsif ($response == $solution) { ++$correct; print "Correct! You have $correct answers\n"; #### my $correct; $correct = ++$correct; if ($response eq 'q') { $quit = 1; } elsif ($response == $solution) { print "Correct! You have $correct right answers\n";