in reply to socket problem
Update: As was stated in the chatterbox, your connections will fail on occassion because there will be no server running on most of the ports you try to connect to. Therefore, dieing isn't what you want there. The if ($sock) { ... } that follows is all you want or need.
Normally, socket read timeouts are handled with either select() or alarm(). I don't know if the socket timeout applies to reads from the socket (it doesn't appear to).
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|