Generate the HTML form
#!/usr/bin/perl
use CGI::Pretty qw(:all);
use strict;
print header();
print generate_form();
print end_html();
sub generate_form {
return start_form,
h1("Please enter your name:"),
p("Last name", textfield('last')),
p("First name", textfield('first')),
p(submit),
end_form;
}
Related examples in the same category