I have a question regarding the CGI module. I'd rather use the CGI functions to put all of my HTML together, But In this one case I can't figure out how to do it the way I want to. Take the following sample.
print table( Tr( [ td(['First Name:', textfield(-name=>"first_name", -maxle +ngth=>25, -size=>12), 'Last Name:' , textfield(-name=>"last_name", -maxl +ength=>25, -size=>12) ]), td({ -colspan=>2 },['Address:' , textarea(-name=>"addres +s", -rows=>10, -columns=>50)]), ] ) );

This creates a table with two rows. The fist row has four columns for two textboxes and two labels. I want the second row to have one column with a colspan of one and one column with a colspan of three. The docs don't specify a way to distribute atrributes among a group of td elements. I know how to give each td in the row a colspan of 2 as above, but how do I give two different colspans to the td elements? Is it possible when using the Tr([]) shortcut?

In reply to td() and Tr() inCGI.pm by thunders

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.