#!/usr/bin/perl -wT use strict; use CGI qw/:standard/; use HTML::Entities; my ( $name ) = (param('name') || '') =~ /^([[:alpha:][:punct:][:space:]]+)$/; my ( $color ) = (param('color') || '') =~ /^([[:alpha:]]+)$/; encode_entities( $name ); print header, <<"END_HTML"; Test page

Your name is "$name" and the color you listed was "$color"

END_HTML