George_Sherston is absolutely right, I would say take it one step further. Check out Mason, HTML::Template or Template Toolkit.

These allow you to remove your markup and design from your code and stick them into a template.

This provides you with some distinct advantages:

You avoid mistakes like the one you ran into

You gain many of the advantages of frames (factoring out repeated elements in your markup) with out the problems associated with frames (i.e. javascript across secure frames, SSL lock not showing if just the inner frame is SSL)

It is more maintainable and easier to read. Do not take this lightly. I have had the unfortunate responsiblilty of maintaining code that had HTML and SQL in HEREDOCS. Trying to read through code with bad indentation because of HEREDOCS will make your head spin. Imagine if you will buried in 60-70 line of HTML 3 lines that loop are your logic for displaing a table :(


I personally lean towards Template Toolkit because of the fact it can template more than HTML, but all of them are fine choices



grep
Unix - where you can thrown the manual on the keyboard and get a command

In reply to Re: Re: Syntax error? I don't think so... by grep
in thread Syntax error? I don't think so... by ninja-joe

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.