Hello Monks,

I wrote a simple script for a friend that he will be using to update his CS group's information webpage. His knowledge of Perl is limited, and although I still have MUCH to learn, I can usually produce good enough code to obtain the desired effect.

The script that I wrote does only 2 things:
  1. uploads a pdf file to a specified directory
  2. updates a static html page w/ a link to the uploaded file
The problem is that I was running the script on my current remote server and shortly after received an email from tech support saying that my script "ran wild" and "hogged all of the system resources". I wrote debugging messages (print "Some sort of message\n" if ($DEBUG);) that don't make it seem that the script is doing anything abnormal. The debugging messages are displayed just as I expect them to be and just before the code exit(0); another debugging message is displayed. I'd assume that if it makes it to the debugging message, that it is also going to exit without errors correctly.

Anyway, my real question is how I should go about figuring out what the problem is. I've looked over my code and still do not see anything to abnormal, but tech support claims otherwise. I can only run the script on my remote server and don't have access to the command line. Any help is appreciated!

In reply to debugging woes by emilford

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.