in reply to Writing a perl quiz. Need advice.
Gee, makes me want to see the questions :-)
I tend to write something like this with the form generation and the cgi receipt in the same file. That makes for closer coupling between the questions and the answers. If you go for a template solution, that changes the script organization, but the coupling between questions and answers should be preserved.
I'd avoid the intermediate variables if I could. Direct evaluation of the cgi params will not cause any problems in comparison to a literal string.
The similarity of your if () {} else {} clauses suggests that sub, printf, and ?: operator can simplify things.
After Compline,
Zaxo
|
|---|