whatIsaid.pl source

#!/usr/local/bin/perl
 
#    Use the CGI.pm library
use CGI;
 
# Make a new CGI object.
$query = new CGI;
 
 
#   Write out the content-type header followed by a blank line.
print $query->header;

#   Write the HEAD section, including the title.
print $query->start_html("What I said");

# Find the bearcat ID.  This will identify the file that contains the data.
# This will work from a URL string, hidden field, and more.

$bearcatID = $query->param('bearcatID');

# Open the file, identified by the bearcat ID, and read the data into an array.

open(PAGE, "<../$bearcatID.html");
@said = <PAGE>;
close(PAGE);
chmod (0755, "../$bearcatID.html");

# Print it all out, word by word, with a space after each word.

foreach $words(@said) {
 print $words . " ";
}

#   End the html.
print $query->end_html;

 Back
 Home