Just because something's in services, doesn't mean it's running.
  Services indicates "names" for port numbers, e.g., "13 is the daytime
  port".

  Observe:

iago@localhost:~% grep daytime /etc/services
daytime          13/tcp
daytime          13/udp

iago@localhost:~% telnet localhost 13
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

  Can't connect to port 13 ... therefore, perl shouldn't be able to
  either.

On Thu, 14 Mar 2002, bob ackerman wrote:

> perlipc doc has sample for doing a socket:
> 
> use IO::Socket;
> $remote = IO::Socket::INET->new(
>                                  Proto    => "tcp",
>                                  PeerAddr => "localhost",
>                                  PeerPort => "daytime(13)",
>                          )
>                        or die "cannot connect to daytime port at 
>                        localhost";
> while ( <$remote> ) { print }
> 
> but it dies for me.
> i see 'daytime' in /etc/services at port 13.
> osx 10.1.3
> perl 5.6.1

-- 
Fred Hicks <[EMAIL PROTECTED]>

Reply via email to