Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Every time I run this I get "Cannot connect to host:port:". Any idea what I did wrong?use strict; use warnings; use IO::Socket; use Cwd; my $host = 'localhost'; my $port = 2110; my $socket = new IO::Socket::INET( PeerAddr => $host, PeerPort => $port, Proto => "tcp", Type => SOCK_STREAM ) or die( "Cannot connect to $host:$port : $@\n" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IO::Socket not connecting
by dave_the_m (Monsignor) on Nov 21, 2004 at 16:14 UTC | |
by Anonymous Monk on Nov 21, 2004 at 16:18 UTC | |
by ikegami (Patriarch) on Nov 21, 2004 at 19:15 UTC | |
|
Re: IO::Socket not connecting
by pg (Canon) on Nov 21, 2004 at 18:04 UTC | |
|
Re: IO::Socket not connecting
by dba (Monk) on Nov 21, 2004 at 16:49 UTC | |
|
Re: IO::Socket not connecting
by gman (Friar) on Nov 22, 2004 at 14:21 UTC |