Examples on web with zipped code to accompany:
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/dept.html
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/depta.html
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/deptb.html
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/cisdept.html
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/cisopt.html
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/cisoptions.html
http://cisweb.bristolcc.edu/~pgrocer/cis47PerlF08/first/cisoptions1.html
hello.cgi
#!/usr/bin/perl
#first.cgi
print "Content-type: text/html\n\n";
#generate HTML
print "<HTML>\n";
print "<HEAD><TITLE>First Script</TITLE></HEAD>\n";
print "<BODY><H1 ALIGN=CENTER>Hello World!</H1></BODY>\n";
print "</HTML>\n";
selectcrs.html
<HTML>
<HEAD>
<TITLE>Link test</TITLE>
</HEAD>
<BODY>
<H1>Select you class from the list below:</H1>
<A HREF="http://www.pgrocer.com/cgi-bin/begin/CIS47.cgi">CIS47</A><BR>
<A HREF="http://www.pgrocer.com/cgi-bin/begin/CIS44.cgi">CIS44</A><BR>
</BODY>
</HTML>
CIS44.cgi
#!/usr/bin/perl
#CIS44 dynamic web page
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD><TITLE>Course test</TITLE></HEAD>\n";
print "<BODY><H1>This is the page for CIS44</H1>\n";
print "</BODY>\n";
print "</HTML>\n";
CIS47.cgi
#!/usr/bin/perl
#CIS47 dynamic web page
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD><TITLE>Course test</TITLE></HEAD>\n";
print "<BODY><H1>This is the page for CIS47</H1>\n";
print "</BODY>\n";
print "</HTML>\n";
passcrs.html
<HTML>
<HEAD>
<TITLE>Link test</TITLE>
</HEAD>
<BODY>
<H1>Select you class from the list below:</H1>
<A HREF="http://www.pgrocer.com/cgi-bin/begin/CISpasscrs.cgi?course=CIS47">CIS47</A><BR>
<A HREF="http://www.pgrocer.com/cgi-bin/begin/CISpasscrs.cgi?course=CIS44">CIS44</A><BR>
</BODY>
</HTML>
CISpasscrs.cgi
#!/usr/bin/perl
#CISpass dynamic web page
print "Content-type: text/html\n\n";
use CGI qw(:standard);
print "<HTML>\n";
print "<HEAD><TITLE>Course test</TITLE></HEAD>\n";
print "<BODY>This is the page for ", param('course'), ".\n";
print "</BODY>\n";
print "</HTML>\n";
pass2info.html
<HTML>
<HEAD>
<TITLE>Link test</TITLE>
</HEAD>
<BODY>
<H1>Select you class from the list below:</H1>
<A HREF="http://www.pgrocer.com/cgi-bin/begin/CISpasscrs2.cgi?course=CIS47&crstitle=Interactive+Web+Sites">CIS47</A><BR>
<A HREF="http://www.pgrocer.com/cgi-bin/begin/CISpasscrs2.cgi?course=CIS44&crstitle=Internet+Developer">CIS44</A><BR>
</BODY>
</HTML>
CISpasscrs2.cgi
#!/usr/bin/perl
#CISpass dynamic web page
print "Content-type: text/html\n\n";
use CGI qw(:standard);
print "<HTML>\n";
print "<HEAD><TITLE>Course test</TITLE></HEAD>\n";
print "<BODY>This is the page for ", param('course'), " ", param('crstitle'), ".\n";
print "</BODY>\n";
print "</HTML>\n";
dept.html
<!dept.html>
<html>
<head><title>Spruce Department Store</title></head>
<body>
<div align=center>
<h1>Spruce Department Store</h1>
<img src="spruce.gif"><br><br>
</div>
<h2>Which department do you need information about?</h2>
<font size=4>
<a href="http://www.pgrocer.com/cgi-bin/begin/dept.cgi?dept=Girls&mang=Smith">Girls</a><br>
<a href="http://www.pgrocer.com/cgi-bin/begin/dept.cgi?dept=Boys&mang=Costa">Boys</a><br>
<a href="http://www.pgrocer.com/cgi-bin/begin/dept.cgi?dept=Infants&mang=Fox">Infants</a><br>
</font>
</body>
</html>
dept.cgi
#!/usr/bin/perl
#dept.cgi - creates a dynamic Web page
print "Content-type: text/html\n\n";
use CGI qw(:standard);
#create Web page
print "<html>\n";
print "<head><title>Spruce Department Store</title><basefont size=4></head>\n";
print "<body>\n";
print "<h1>Spruce Department Store</h1>\n";
print "The dept is: ", param('dept'), " The manager is: ", param('mang'), ".\n";
print "</body>\n";
print "</html>\n";