zhshqzyc has asked for the wisdom of the Perl Monks concerning the following question:
#!C:/Perl/bin/perl use strict; use CGI::Pretty qw( -debug ); use CGI::Carp qw( fatalsToBrowser ); my $q = new CGI; my $pay = $q->param(payment=>"discover","master","check"); my $pay_text; if ( $pay eq "discover" ) { $pay_text = "Discover Card"; } elsif ( $pay eq "discover" ) { $pay_text = "Master Card"; } elsif ( $pay eq "check" ) { $pay_text = "by check"; } else { $pay_text = "unknown method"; } print $q->header, $q->start_html( -title=>"Welcome", -bgcolor=>"pink"), $q->p( "Your name is ", $q->b("name")), $q->p( { -style=>{yext-decortation:underline}, "Your age is ", $q->textfield(-name=>"age")), $q->p( "Your method of payment is ", $q->span($pay_text),-style=>{color=>"blue"}) $q->end_html;
Edited (davorg): replaced [code] tags with <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't produce a web page via CGI
by Melly (Chaplain) on Nov 23, 2006 at 16:56 UTC | |
|
Re: Can't produce a web page via CGI
by davorg (Chancellor) on Nov 23, 2006 at 16:23 UTC | |
| |
|
Re: Can't produce a web page via CGI
by reasonablekeith (Deacon) on Nov 23, 2006 at 16:38 UTC | |
|
Re: Can't produce a web page via CGI
by brian_d_foy (Abbot) on Nov 23, 2006 at 21:20 UTC |