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

Strange indeed. Does it die on the line containing
die if $@ && $@ ne "alarm\n";
? Try to change it to
die $@ if $@ && $@ ne "alarm\n";