Alternatively, break the rules again and just open the scalar as if it were a file

Yes, sure. I said "no easy way", not "no way at all". But you still cannot do nested elements.

You shouldn't need nested tables. If you find yourself needing a table in another table, that is probably because one table is there just for the layout of the page. And such a table isn't created with something like this, because you need attributes badly.

You may tell me what I "should", but when people are paying me to put tables in tables, I prefer not to argue. Besides, I addressed my need of attributes, right? :-)

I meant the code to be simple. To get there, I broke quite some unwritten rules about purity and reusability. It was not my intention to support anything more than printing simple tables.

Acknowledged and appreciated. I am not saying "thou shalt not print", just I often find myself needing to stuff it into a variable. Or nested tables. I just took inspiration from it, to do my own thing. Personally, I never find myself writing "simple tables" (no one is paying for that), so to me the inspiring thing was the code layout, and I tried to work out how I could make my code look like that.

The Sidhekin
print "Just another Perl ${\(trickster and hacker)},"


In reply to Re: Re: Re: Readable HTML tables by Sidhekin
in thread Readable HTML tables by Juerd

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.