# c:\programmi\sambar41\perl\perl.exe -Tw # $Header: /cys/people/brenner/http/docs/web/perl5/RCS/simple-form.cgi,v 1.5 1996/03/29 # 22:58:40 brenner Exp $ # Copyright (C) 1994 Steven E. Brenner # This is a small demonstration script to demonstrate the use of # the cgi-lib.pl library #require 5.001; #use strict; require "cgi-lib.pl"; MAIN: { my (%input, # The CGI data $text, # Munged version of the text field entered by the user $field); # Each of the fields (used for testing) # Read in all the variables set by the form &ReadParse(\%input); # Check that everything has been entered foreach $field (qw(name color quest caffe text)) { &CgiDie("Error: Missing field '$field'\n") unless defined $input{$field}; } # Print the header print &PrintHeader; print &HtmlTop ("Messaggio di risposta"); # 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 print <Ciao $input{'name'}!

Tu, $input{'name'}, il cui colore favorito e' $input{'color'} stai cercando una cosa che è $input{'quest'}, e preferisci il caffè $input{'caffe'}. E questo è il messaggio che hai mandato:

$text

Stai usando questo browser: $ENV{'HTTP_USER_AGENT'}

ENDOFTEXT # If you want, just print out a list of all of the variables. #print "


E questa è la lista delle variabili che hai immesso...

"; #print &PrintVariables(\%input); # Close the document cleanly. print &HtmlBot; }