#!/usr/bin/perl use strict; use warnings; use CGI; my $cgi = CGI->new; print $cgi->header('text/html'); print << "EndOfHTML"; A Simple CGI Page

A Simple CGI Page

Name:
Age:


EndOfHTML if ( my $name = $cgi->param('name') ) { print "Your name is $name.
"; } if ( my $age = $cgi->param('age') ) { print "You are $age years old."; } print '';