#!/usr/local/bin/perl # # template.cgi - A sample CGI script that generates pages with the # same look-and-feel as the CS Departmental Pages. This script # uses the supplied template.html file to properly set the page # title, owner, and email address. # # robh 10/2001 # # # Define the template file you wish to use # $template="/l/www/Support/samples/template.html"; # # Define the custom information you want to use # $title="Sample page title here"; $name="Joe Doe"; $email="joedoe"; # # Define a subroutine to generate your custom content # sub generate_content { print "

Your content goes here

"; } # # Generate the Content-type header # print "Content-type: text/html\n\n"; # # Print out the template, filling in the custom information as # We find the placeholders in the template. # open(TEMPLATE,"< $template") || die "unable to open $template"; while (