CECS 5100

Survey of Educational Computer Languages

Fall 2002


Assignment #4 - Intro CGI.pm

Due Date: November 14, 2002

Value: 10 points

Send the instructor an e-mail containing the URL which calls this assignment. greg@tapr.org.

Using PERL create a .cgi using the CGI.pm module that will display the name and course value pairs based on the following GET syntax http://saturn.cecs.unt.edu/cgi-bin/yournamehere/assign4.cgi?name=yournamehere&course=5100

Required Output (something close to this with your name instead of mine):

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<p>Your name is: greg</p>
<p>Your course is: 5100</p>

Program Example:

  1. The following is a template for the program. You will have to add statements to read in the course value pair and then print it as well.
    use strict;
    use CGI qw(:standard);
    my $q = new CGI;
    my $name = param("name");
    print header("text/html"),
          p("Your name is: $name"),

Copyright 2002, Dr. James G. Jones