I'm trying to insert an HTML comment in the head tag of a doc generated by CGI.pm, but I'm getting and error and I can't see what I'm doing wrong.
#!/usr/local/perl-5.8.7/bin/perl -T
use warnings;
use strict;
use CGI;
use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;
my $query = new CGI;
print $query->start_html(
-head=>comment('commentary in the <head>'),
);
print $query->end_html;
gives
<h1>Software error:</h1>
<pre>Undefined subroutine &main::comment called at /usr/local/apac
+he-1.3.33/cgi-bin/tryCommentInHead.cgi line 7.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error
+ message
and the time and date of the error.
</p>
[Mon Aug 14 15:00:08 2006] tryCommentInHead.cgi: Undefined subroutine
+&main::comment called at /usr/local/apache-1.3.33/cgi-bin/tryCommentI
+nHead.cgi line 7.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.