diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-01 14:21:16 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-01 14:21:16 +0100 |
commit | e9dc4a2bf6ff50c27a5bd2e83ff4755923a33e7a (patch) | |
tree | 47d916204681e691f7c15002f5ad25fd8489d10e /cpan/CGI/examples/tryit.cgi | |
parent | 3fe7d1fbbb0f3821a413b2c6d13fa8821c6230d3 (diff) | |
download | perl-e9dc4a2bf6ff50c27a5bd2e83ff4755923a33e7a.tar.gz |
Move CGI from ext/ to cpan/
Diffstat (limited to 'cpan/CGI/examples/tryit.cgi')
-rw-r--r-- | cpan/CGI/examples/tryit.cgi | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpan/CGI/examples/tryit.cgi b/cpan/CGI/examples/tryit.cgi new file mode 100644 index 0000000000..83c620c3e4 --- /dev/null +++ b/cpan/CGI/examples/tryit.cgi @@ -0,0 +1,37 @@ +#!/usr/local/bin/perl + +use CGI ':standard'; + +print header; +print 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, + end_form, + hr; + +if (param()) { + print + "Your name is: ",em(param('name')), + p, + "The keywords are: ",em(join(", ",param('words'))), + p, + "Your favorite color is: ",em(param('color')), + hr; +} +print a({href=>'../cgi_docs.html'},'Go to the documentation'); +print end_html; + + |