in reply to Re: socket problem
in thread socket problem

i, however, want my own code to work. and it does just fine if you takeout the "or die" and $sock->timeout()...which i dont understand, and really want to understand.

Replies are listed 'Best First'.
Re: Re: Re: socket problem
by submersible_toaster (Chaplain) on Jan 07, 2003 at 01:37 UTC

    When IO::Socket::INET->new() is unable to make the socket connection it returns false instead of a socket object. So you probably don't want to die just because a port is ignoring you. Try  or $sock = '' instead of or die $!,$@

    Further reading of the IO::Socket::INET POD reveals that you can give Timeout => 5, as part of the hash passed to ->new()

    I have tried your scanner, it does work , but the mechanism you use in makeconn to connect , never seems to return any info.


    I can't believe it's not psellchecked