Dear all,

I have a question, since I am a programmer. I've now finished my program in perl; actually one of my colleagues suggests splitting the html code into another file like a module, and passing all the info as a hash into that html file and generating another new html file out.

But my perl program contains all the logic to print the html, so I follow the way he wants to split the html code; then I need to put the header, all the functions in perl to print the header where the expiry will be no more, and in that temp file I need to put the .

So should I do it or not? For in my opinion, perl is for the replacement of html; why do we need to split the html code into another file, make a perl file to pass in the server data which needs to be published for the user with hash variable, and finally make out another new html file, and publish the html file indeed the cgi file?

Maybe the question I make a bit confusing; but please write some ideas and please ask about the confusing parts, I will reply.

Thank you

Edit 2001-06-18 10:17 GMT +1 -- ar0n More descriptive title
Edit 2001-06-18 5:17 EST -- Petruchio Added whitespace, corrected grammatical and typographic errors. View source for original.


In reply to Separation of content and code by Draff

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.