Hello Monks

I got a perl script which looks for file in a directory for specified time and in between if file comes then the program
quits saying file has come and if not comes out with a message after the specified time file hasn't come...this script was written in 1996 in perl using alarm function...but the latest versions of perl Active State 5.8 doesn't seem to implement alarm function...what will be the approach to this problem because our systems are upgraded with latest perl version and this script no longer works..

Appreciate any help in this regard

alarm($endsecs); local $SIG{'ALRM'}="TimeOut"; print STDOUT "*** FileWatch is waiting...\n";
Thanks & Regards
Sridhar

2006-10-28 Retitled by GrandFather, as per Monastery guidelines
Original title: 'FileWatch'


In reply to Using the alarm function in ActiveState Perl 5.8 for FileWatch by mantra2006

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.