I've posted questions similar to this before, but I can't find the thread, so I'll post it again here.

I've been converting an existing CGI script written in perl to make use of the CGI.pm perl module. I've been successful until I hit a Table being generated. I've been success using the start_table method to generate the initial table tag. Now, I have an array that contains all of the first rows table cells. I suspect that I should be able to give the TR method this array to allow it to generate the first row, here is the existing code that works just fine:

foreach (@DISPLAY_COLS) { print("<th valign=bottom>$COLUMN_TITLE{$_}</th>"); };

and here is what I've tried. It compiles, but at execute time, it simply stops at this point with no error reports that I can see:

print $cgi->tr([@COLUMN_TITLES]);

where $cgi was set initially to a CGI object. Can somebody help here. I would also like a reference to a good tutorial which talks about CGI.pm at this level. Most CGI.pm tutorials I've seen are just HTML-ized versions of the PERL doc inside of CGI.pm itself, which is of no help in this area.


In reply to How to use TR to generate a table row by kmullin5016

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.