first off, do not use &function_name; calls. use function_name() instead. unless you know the difference.

also:

print th(@week);
You don't want to do that for each date, do you? By the way, you probably need to provide references to arrays as arguments to Tr and td, but my memory of the CGI.pm's HTML constructs is a bit rusty.

here's a clear example of how to use the CGI table methods. Note the nested calls to table(), td() and Tr().

side note:

but [I] cannot seem to get the 30 days to print using a table in CGI
It's generally useful to specify what you expect of the output and in what way your current code doesn't fulfill that expectation. Is the table not formatted correctly? Is there no table at all? Do you want to flip the horizontal and vertical axis? I don't know.

For general reference: I know what i mean, why don't you?, how (not) to ask a question and how to ask questions the smart way.

ps: it's calendar :-)


In reply to Re: cgi calander by Joost
in thread cgi calander by mikejones

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.