Complete Example

Complete Example

#!/usr/bin/perl

use CGI ':standard';

print header,start_html('Order Ice Cream'),

h1('Order Ice Cream');

generate_form();

print_results if param();

print end_html();

sub print_results {

my @top = param('toppings');

print b('Customer name: '),param('customer'),br,

"You ordered a ",param('flavor'),' ',

param('cone'),' cone with ';

print @top ? join(',',@top) : 'no',' toppings';

}

Previous slide Next slide Back to the first slide View Graphic Version