More Basic CGI.pm Methods
-
CGI.pm provides methods to generate HTML, and even methods to generate
some JavaScript with the HTML!
-
These methods start an HTML document.
# Write out the content-type header followed by a blank
line.
print $query->header;
# Write the HEAD section, including the title.
print $query->start_html("Welcome");
-
And this method finishes it
print $query->end_html;
-
It's that easy! Now, let's use the CGI.pm methods we have learned
thus far with the firstname HTML before to print the user's first name
on a new page.
Demo
Home