1#!/usr/local/bin/perl 2 3use CGI ':standard'; 4 5print header; 6print start_html('A Simple Example'), 7 h1('A Simple Example'), 8 start_form, 9 "What's your name? ",textfield('name'), 10 p, 11 "What's the combination?", 12 p, 13 checkbox_group(-name=>'words', 14 -values=>['eenie','meenie','minie','moe'], 15 -defaults=>['eenie','minie']), 16 p, 17 "What's your favorite color? ", 18 popup_menu(-name=>'color', 19 -values=>['red','green','blue','chartreuse']), 20 p, 21 submit, 22 end_form, 23 hr; 24 25if (param()) { 26 print 27 "Your name is: ",em(param('name')), 28 p, 29 "The keywords are: ",em(join(", ",param('words'))), 30 p, 31 "Your favorite color is: ",em(param('color')), 32 hr; 33} 34print a({href=>'../cgi_docs.html'},'Go to the documentation'); 35print end_html; 36 37 38