in reply to Re^2: IO::Socket *always* making connection?
in thread IO::Socket *always* making connection?
I don't see where your problem is. The following script works fine for me. My box has an smpt server listening on port 25, a pop3 server on port 110, and nothing on ports 9805 and 9806. The results are as expected.
#!/usr/bin/perl -w use strict; use IO::Socket; for my $port (25, 9805, 9806, 110) { my $skipA = 0; my $socketA = new IO::Socket::INET( PeerAddr => 'localhost', PeerPort => $port, Proto => 'tcp', ) or $skipA = 1; print "\$port: $port; \$skipA: $skipA\n"; } __END__ $port: 25; $skipA: 0 $port: 9805; $skipA: 1 $port: 9806; $skipA: 1 $port: 110; $skipA: 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: IO::Socket *always* making connection?
by wolfger (Deacon) on Feb 08, 2005 at 19:12 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |