in reply to Re: Timeout problem using IO::Socket
in thread Timeout problem using IO::Socket

How about setting your alarm more directly, for more accurate debugging -
$SIG{ALRM} = sub { die "DIE DIE DIE!\n" };
Show us the actual excerpt of your code -- you're asking us to use our imaginations in dreaming up possibilities for what is obviously a subtle problem.