Regarding your update:
I suppose it does not really matter if the source looks neat but I feel that the way the source looks represents how I code.

Bear in mind: the "source" that really matters is your perl code. Proper indenting makes a big difference there, and human readability is a high priority. Another important quality factor is "parsimony" -- avoidance of unnecessary work. If you add a significant amount of effort, code, cpu cycles, etc, to "solve" things that aren't really problems and that have no practical impact on the task at hand, the people who end up having to read your code may tend to have doubts about its value. (And you should be hoping that someday someone else will have to read your perl code.)

As for the html markup, I said before, when it works, it's unlikely that any human ever really looks at it, and those who do should know better than to have high expectations about indenting and so forth. We have HTML parsers to get around the unavoidable ugliness of it all.


In reply to Re: Misformatted HTML::Template source code by graff
in thread Misformatted HTML::Template source code by Lawliet

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.