#!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); # this print statement ripped from CGI docs ;) print header, start_html('A Simple Example'), h1('A Simple Example'), start_form, "What's your name? ", textfield('name'), p, "What's the combination?", p, checkbox_group( -name=>'words', -values=>['eenie','meenie','minie','moe'], -defaults=>['eenie','minie'] ), p, "What's your favorite color? ", popup_menu( -name=>'color', -values=>['red','green','blue','chartreuse'] ), p, submit('go'), end_form, ; if (param('go')) { print hr, "You submitted the following: ", table( {border => 1}, # here is that 'dreaded' map i warned about ;) map Tr( th({align=>'right'},$_),td[param($_)] ), param() ), ; } print end_html();