#!/usr/bin/perl
use strict; use warnings;
use CGI;
my $c = new CGI;
if(defined($c->param("foo"))) {
print $c->header,
$c->start_html("Thanks for submitting the Foobar Form!"),
$c->h1("Foobar Form Results"),
"
",
"Foorbar Form Results: ", $c->param('foo'), " ",
"Thanks for submitting!",
$c->end_html();
} else {
print $c->header,
$c->start_html("It's the Foobar Form!"),
'',
$c->end_html();
}