Hi, Could any one tell me what is wrong with my code? It does not time out after 5 seconds which is what i need. It remains in the infinit loop.
#! /usr/bin/perl
use strict;
use warnings;
sub comeOut;
$SIG{ALRM} = \&comeOut;
while (1) { };
eval
{
alarm 5; #timeout is 60
}
sub comeOut
{
print "\nThis is what i wanted\n";
exit;
}
Pls help me...
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
