O'Reilly logo

Sams Teach Yourself Perl in 21 Days, Second Edition by Rafe Colburn, Laura Lemay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Example: Survey

Our Hello World example earlier might have given you a taste of how CGI scripts work, but it was too simple to be of much use. Here's a much more complex script that handles a Web-based survey. The script keeps track of all the survey for the data, handling the input from the current form and generating tables of results based on all the data submitted so far. Figure 16.4 shows our simple survey.

Figure 16.4. A simple Web survey.

After filling out the survey, the CGI script processes the input, adds it to the data already received, and generates a set of tables, shown in Figure 16.5.

Figure 16.5. The Web survey results

All the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required