#!/usr/bin/perl use CGI qw/:standard/; if (param()) { showresult(); } else { startpage(); } sub startpage { print header, start_html('Lynxtest: startpage'), h1('Lynx test'), start_form(-method=>"POST"), "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, end_form, end_html; } sub showresult { my $name = param('name'); my $keywords = join ', ',param('words'); my $color = param('color'); my $myself = url(-relative=>1); print header, start_html('Lynxtest: result'), h1('Result'), "Your name is ",em(escapeHTML($name)),p, "The keywords are: ",em(escapeHTML($keywords)),p, "Your favorite color is ",em(escapeHTML($color)); print p ("The following Link is the problem:", "New"); print end_html; }