There are nearly 10 years and at least 14 versions of differences between 5.60 & 5.8.8. Whilst the perl devs do an amazing job of maintaining backwards compatibility, that is a big leap to make without testing.

The first thing you need to discover is where in the code it is hanging. And the simplest way to go about that is to set up a non-production machine with perl and an appropriate directory structure so that you can run the script manually and see what happens.

If you run monitor.pl from the command line like this:

perl -d:Trace monitor.pl

You may need to install Devel::Trace if you do not already have it

Then you will get a line by line trace of the running program output to the screen. Wait until the script reaches the point where it is waiting for files, and then copy an appropriate file into the appropriate subdirectory and see what happens.

Note: The program will run considerably more slowly than normal, and will produce masses of output. Once you have some idea of where the program is hanging (or looping), you can add use Devel::Trace into the script itself and place

Devel::Trace::trace('on'); # Enable Devel::Trace::trace('off'); # Disable

at significant points in the code to limit the output to the important bits.

You can also re-direct the output to a file:

perl -d:Trace monitor.pl 2>&1 > monitor.log

And then load it into an editor to track it through. Make sure you have plenty of disk space available on the machine.

You should also seriously consider contracting a local Perl programmer to help you out.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

In reply to Re: Perl Hanging by BrowserUk
in thread Perl Hanging by Mirky

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.