Hi everyone,
  Jay offered me the following code to help with something.  I don't  undertand 
it, but tried to use it anyway to see if it would work.   The computer told me 
there was a syntax error in the area I highlighted  in color.  I can't find it 
- maybe that's because I don't  understand the code fully, but if anyone can 
show me where it is I'd be  grateful.
  Thanks,
  Fred Kittelmann

Jay Savage <[EMAIL PROTECTED]> wrote:my $timeout = 3600; # 1 hour
eval {
    local $SIG{ALRM} = sub { die "longRunningModule timed out\n" };
    alarm $timeout;
    require longRunningModule;
    alarm 0;
}

if ($@) {
    if ($@ =~ /timed out/) {
        # timeout
    } else {
        # some other error
    }
}
  


Fred Kittelmann
hOURS
215-551-1490
www.hoursystem.net
 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to