Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^4: Random F%^k up strings!
in thread Random F%^k up strings!

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found