This problem is an odd one. At least I think so. My typical development involves two machines: my Win2k desktop for development, and Windows NT Server 4.0 for production use. Both run Apache 1.3.20 and ActivePerl 5.6.1. In one of my scripts, I had the following snippet of code:
$legal_temp = $subdivision . "<BR>\n" . $legal;
This worked exactly as intended on my development station, but when I moved it to the production server, Dr. Watson would trigger and halt execution of my script when this line was reached. I checked the server error log for details (as always, I have warnings, strict, and CGI::Carp enabled) to find none. I executed the script from the command line to again find no errors or warnings. I took a look through the script before this line again and verified that $subdivision, $legal and $legal_temp were all defined prior to this line.

I was able to work around Dr. Watson by changing the line to read this:

$legal_temp = $subdivision . "<BR>\n"; $legal_temp .= $legal;
I'm not sure why this works, but it does. And not knowing why annoys me to no end :P

I have a similar situation with the following line:

$bodytext .= "<TR><TD align=\"left\">" . ($lcount > 0 ? "<HR>" : "") . + "<FONT size=\"2\">";
No warnings or errors, and all variables are defined prior to use. However, this line also triggers Dr. Watson. By changing it to this:
$bodytext .= "<TR><TD align=\"left\"><FONT size=\"2\">";
the Dr. will leave me alone.

Is there something obvious that I'm doing wrong here? Or is there a difference in how ActivePerl behaves on Win2k as opposed to NT4? I'm confused. . . . if someone can help/explain, it would be greatly appreciated.

Thanks!
MrCromeDome


In reply to Dr. Watson paid my perl script a visit. . . by MrCromeDome

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.