There are, IMHO, “a whole bunch of extremely good reasons why” it is best: (a) to determine what you want to generate before you generate it; and (b) to use a templating tool to actually generate the HTML or anything-else.
One of these reasons is “separation of concerns.” If you do it “the other way,” the day will come when someone wants you to make some page-output change, e.g. so that the page looks noticeably-different in a particular case ... and, perhaps obviously (if you’re very lucky) but perhaps quite subtly, the answers start coming out wrong. And the logic by that time is so danged jumbled-up that you wish you could rewrite it but in the meantime that you didn’t have to touch it.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||