As a reminder, let's look again at our simple program that prints the output on the command line for us to inspect. It's a basic Perl program that includes the CGI.pm and then generates the start of your HTML document using the start_html function:
#!/usr/bin/perl -wLet's replace that last line with a new one and see what happens when we add in the -title and -author attributes like so:
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->start_html;
print $cgi->start_html(Running this will produce a slightly different output that contains the proper document title:
-title => 'My CGI.pm Web Page'
);
<?xml version="1.0" encoding="iso-8859-1"?>Much better to pass in the -title attribute and properly title all your HTML documents.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"><head><title>My CGI.pm Web Page</title>
</head><body>
