Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^5: Random F%^k up strings!by huck (Prior) |
on May 22, 2017 at 18:14 UTC ( [id://1190873]=note: print w/replies, xml ) | Need Help?? |
Each time that runs because the user pressed verify it generates a new $answer, that bears no relationship to whatever was typed into $useranswer the previous time it was displayed to the user Then why does it WORK when I remove the '#' from '# $answer = "ghRuE"; Because the $answer stays the same each time the program runs since it is not generated anew each time the cgi runs and is static from run to run. The random generation of $answer worked just fine and the comparison worked just fine, it is just that since $answer was regenerated from scratch each time the program ran it didnt match what was generated the last time the program was run, and that previous version was what was displayed to the user for them to type in and was then returned in $useranswer.
In Section
Seekers of Perl Wisdom
|
|