I'm ambivalent about making a reference to CGI.pm, since the script is so short and sweet. But I guess I will anyway. Handcoding HTML into scripts is a bad habit. And in this case, using CGI allows you to make program logic clearer. Plus, you can generate well-formed HTML with about half the typing, and a lot less worries about it breaking.
Apparently I'm getting downvotes for a reasonable suggestion. Here is an example of how much cleaner the code looks when you use CGI to save a static HTML file:
use CGI qw(:standard); open (FILE, ">test.html") or die "cannot open test.html: $!\n"; print FILE ( start_html( -title => "test page" ), p( "Test paragraph." ), p( "Here is a second paragraph." ), hr(), p( "This is the last." ), end_html() ); close FILE;
PS. The <center> tag has been deprecated for three years.
In reply to Re: MSIE Favorite Start Page
by ichimunki
in thread MSIE Favorite Start Page
by Adam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |