Hi All,

 

I want to use timers to check if certain variables are set and if not
send some data back to a client... 

Been searching for this a while now, but all I can find on alarm are
examples on timing out commands.... 

 

So something like:

 

sub timeout {

  $timeout = 5;

  eval {

    local $SIG{ALRM} = sub { die "alarm\n" }; 

    alarm $timeout;

    unless $status_ehlo == "1";

    alarm 0;

  };

  if ($@) {

    print $client "Timed Out";

    die unless $@ eq "alarm\n"; 

  } else {

   Print $client "Hi!";

}

 

Thanks! 

 

- 

Marco van Kammen
Springer Science+Business Media
System Manager & Postmaster 

- 

van Godewijckstraat 30 | 3311 GX
Office Number: 05E21 
Dordrecht | The Netherlands 

-  

tel 

 +31(78)6576446

fax 

 +31(78)6576302

- 

www.springeronline.com <http://www.springeronline.com>  
www.springer.com <http://www.springer.com/> 

- 

 

 

Reply via email to