in reply to Re: Using IO::Socket
in thread Using IO::Socket
"Note that a socket which fails to connect does not return a false value."
This is definitely wrong, otherwise why the following worked for me:
use IO::Socket::INET; use strict; use warnings; IO::Socket::INET->new(Proto => "tcp", PeerAddr => "123.123.123.123", P +eerPort => 123, Timeout => 10) || die "failed to connect";
If whatever before 'or' was not evaluated to false, why should the die get evaluated, and print the message on screen for me?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using IO::Socket
by Zaxo (Archbishop) on Oct 12, 2004 at 17:06 UTC |