The canonical way to open an IO::Socket::INET instance to do what you want is,
Note that a socket which fails to connect does not return a false value.my $MySocket = new IO::Socket::INET->new( PeerAddr => $host, PeerPort => $port, Proto => 'tcp', # or whatever Timeout => 300); $MySocket->connected() or die "No connection to $host:$port";
After Compline,
Zaxo
In reply to Re: Using IO::Socket
by Zaxo
in thread Using IO::Socket
by Earindil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |