#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; print $q->header(); if ( $q->param('filled') eq 'this form' ) { # the user submitted the form so process it # here we get the value the user put into the username field my $username = $q->param('username'); # display some sort of thank you page print "You submitted $username"; } else { # the script was not called by the form below so show the form print <

Username:

HTML } exit;