Automating Poll Processing

In the preceding chapter, we developed a script to conduct an online poll (“vote for your favorite groundhog”). After writing that script, we discussed several of its shortcomings, primarily having to do with the amount of information about the poll that was hardwired into the script: the number of choices, the labels to display for those choices, the internal names used in the vote tallying table, the poll title, and so forth. Putting all these things into the polling script makes it efficient, but also very special purpose. You might expect an application to be highly specialized and tailored to your particular requirements if it’s something like a customized order-processing system, but online polls are fairly stereotyped. ...

Get MySQL and Perl for the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.