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

very strange, the code always die and with the unwanted message "Alarm clock", even if I replace in the code things like $SIG{ALRM} = sub { die "Timeout\n" }; or $SIG{ALRM} = sub { return; }; - There is a way to solve it? Thank you

Replies are listed 'Best First'.
Re^5: Net::SOCKS how define timeout?
by choroba (Cardinal) on May 08, 2010 at 18:39 UTC
    Strange indeed. Does it die on the line containing
    die if $@ && $@ ne "alarm\n";
    ? Try to change it to
    die $@ if $@ && $@ ne "alarm\n";