CECS 5100

Survey of Educational Computer Languages

Fall 2003

Assignments

Assignment #4 - Intro CGI.pm

Due Date: November 7, 2003

Value: 10 points

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

Assignment:
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"
	"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head><title>Welcome</title></head>
<body>
<p>Your name is: greg</p>
<p>Your course is: 5100</p>
</body></html>
 

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.
    #!/usr/bin/perl
    
    use strict;
    use CGI qw(:standard);
    
    my $q = new CGI;
    my $name = param("name");
    
    print header("text/html"),
          start_html("Welcome"),
          p("Your name is: $name"),
          end_html;
    
     


Copyright 2003, Dr. James G. Jones