Exploiting the Information World
ITEC-2110 - Fall 2000

These exercises are part of your grade!

For each exercise that you complete during class you must make record your results to show the TA (or show the TA your screen). If you don't have time to complete everything during class you must record your results and give them to the TA by the next class meeting.

EIW Exercises: Perl CGI Program (multiple fields)


1. Perl CGI Grade Calculator

Remember Exercise 9? You had to write a Javascript grade calculator. Your web page allowed the user to type in 2 test grades and 4 homework grades and compute (and display) the final average for a student. The test grades count 30% each and the homeworks count 10% each.

Do this with a perl based CGI program instead of JavaScript. Your "submit" button should now send the contents of the form to a CGI program that you write. The program should send back another copy of the form with the user entered values as defaults, and it should send back the final grade. The user can then modify the form to check out another set of grades...

Since your Perl CGI program will need to get values from individual fields, you probably want to use the eiw-cgi.pl library (or something that makes it easy to get at the field values). You can grab the entire library here: eiw-cgi.pl.

Check out the lecture notes on EIW Perl CGI Library for an example of how to use the library to get at the value of fields.