#!/opt/bin/perl
# $Header: /cys/people/brenner/http/docs/web/RCS/combined-form.cgi,v 1.4 1996/03/29 22:59:29 brenner Exp $
# Copyright (C) 1994 Steven E. Brenner
# This is a small demonstration script to demonstrate the use of
# the cgi-lib.pl library, where the script both creates the form and
# processes its input
require "cgi-lib.pl";
MAIN:
{
# Read in all the variables set by the form
if (&ReadParse(*input)) {
&ProcessForm;
} else {
&PrintForm;
}
}
sub ProcessForm {
# Print the header
print &PrintHeader;
# Do some processing, and print some output
($text = $input{'text'}) =~ s/\n/\n /g;
# add 's after carriage returns
# to multline input, since HTML does not
# preserve line breaks
$input{'comments'} =~ s/\x0d//g;
open (COMMENTSFILE,">>anon103");
print COMMENTSFILE "Comments:\n";
print COMMENTSFILE "$input{'comments'}";
print COMMENTSFILE "\n";
print COMMENTSFILE "\n";
print COMMENTSFILE "\n";
close COMMENTSFILE;
print <Thanks!
Thanks!
Thanks for your comments. I appreciate
them and will try to use them to improve the class.