&do_program(1, 100); is a subroutine in the same script.

In a nutshell, calling the &do_program(1, 100), it will do the followings:

1) Connect to the MySql database
2) Retrive 100 domains beginning from row 1 for 100 rows in one of the tables.
3) Remote access each of the 100 domains using LWP::UserAgent
4) Then abstract the site(domain) page information

It generally takes about 2 minutes to complete all of the above steps 1 to 4.
(Notes: I've watched it ran many times, it took around that kind time to complete.)

I'm mainly trying to find out if the scripts in the eval { } will work or not.

They do not seem to work, because &do_program(1, 100) will continue to run from start to finish even though I set the alarm timeout variable, $timeout at different numbers less than 120(2 minutes), e.g. $timeout=20, $timeout=10, $timeout=5... down to 1 second $timeout=1.

For some reason, there is no alarm signal generated in the eval {} block??

In reply to Re^2: Perl Alarm Not Working by aceofspace
in thread Perl Alarm Not Working by aceofspace

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.