in reply to Re^3: Net::SOCKS how define timeout?
in thread Net::SOCKS how define timeout?

Thanks guys, it solved the problem. I'm shamed, very idiot problem. The only problem now is that when the code timeout it print a crazy error "Alarm clock" that I never asked to print. I mean, I have a own message like print ("Timeout\n"); but when the timeout happens it's never called and instead it prints this "Alarm clock" that is not in my code. There is a way to replace it with my own print timeout error? Thank you

Replies are listed 'Best First'.
Re^5: Net::SOCKS how define timeout?
by choroba (Cardinal) on May 08, 2010 at 18:27 UTC
    Just override the alarm signal handler:
    $SIG{ALRM} = sub { die "Timeout\n" };