IO::Socket::INET sets $@, not $!. Check that for a better error message.
In reply to Re: socket problem by chromatic in thread socket problem by vxp