You can put Perl in "virtually" any extension, as long as you got your #!/usr/bin/perl coding correct, and your server supports Perl. Perl usually has 2 main extensions: .pl .cgi and .pm (.pm is Perl modules). What would be much easier is to put the html in the Perl code. This way you can avoid modules, not that it would matter but just to be quicker. If you are not sure of how to put HTML into Perl, here's a very simple code to use:
print "Content-type: text/html\n\n"; print "<html><b><u><font size=4>Yo! Wasup?</font></u></b></html>\n";
This is a VERY simple code but yet effective.

One person can change the corse of history. One person can destroy the human race. That one person is out there, I intend to find him.

My other writings.

In reply to Re: Can I code perl inside HTML? by john1987
in thread Can I code perl inside HTML? by rcsen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.