Keep It Simple, Stupid | |
PerlMonks |
Re: Lame-Ass Newbie questionby ivory (Pilgrim) |
on Aug 03, 2000 at 23:10 UTC ( [id://26061]=note: print w/replies, xml ) | Need Help?? |
You're using "Elements of Programming Perl", right? The mathq example? You are probably creating a new $correct at each pass through the loop. Try putting "my $correct" and right after "my $quit = 0;". That way all you do is add to the value of $correct for each correct answer. If you're using a different book and this doesn't make any sense, my apologies.
--Ivory
In Section
Seekers of Perl Wisdom
|
|