#!/usr/bin/perl
#
# print header stuff
#
print "Content-type: text/html", "\n\n";
print "<html>\n";
print "<body background=\"nevada.gif\">\n";
#
#define stuff to grab data entered on form
#
require TripodCGI;
use CGI;
$cgi = new CGI;
#
# get the file name they want to list
#
$name=$cgi->param('name');
#
#
#open the file so we can read it and print it
#
#open(ALL,"$name");
open(ALL,"$name") or print "<h2>Error</h2>can't open file<blockquote>$name</blockquote>";
#
#read each line in the file
#
print "<pre>\n";
while(<ALL>) {
#
#convert & to &
#convert < to <
#convert > to >
#
s/&/&/g;
s/</</g;
s/>/>/g;
#
# print each line
#
print "$_<br>";
}
print "</pre>\n";
#
#close the file
#
close(ALL);
exit;