My program compiled cleanly (when I used the -c option) but when I ran it from a command line, I got a TON of warning messages (I assume they were warnings, because it didn't stop the program from running) that were essentially due to my environment didn't have a number of environmental variables set that are normally set in a CGI environment.

Yes. A CGI environment has a lot of variables set that aren't usually present in a shell environment. Nothing to stop you setting them though.

So that is why I removed the 'using strict', to get away from those warning messages and see messages that were really run time failures, which I've seen happen. Errors that the compiler didn't catch, but they were caught at runtime.

Yes. Programs have compile-time errors and runtime errors. You need to use different tools to catch both of them. But you need to catch and eliminate both kinds of error.

So how do you propse to get around this problem?

Either learn to ignore the errors that are caused by the fact that you're not running in a CGI environment or set up your shell environment so that it looks like a CGI environment.


In reply to Re^5: help with start_table of CGI.pm by davorg
in thread help with start_table of CGI.pm 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.