I am fairly new to IPC with sockets and expect this issue is a simple one to resolve.
I'm trying to understand why I cannot get this example script from perldoc perlipc to run on my Ubuntu setup:
#!/usr/bin/perl -w
use IO::Socket;
$remote = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "localhost",
PeerPort => "daytime(13)",
)
|| die "can't connect to daytime service on localhost";
while (<$remote>) { print }
The script dies because the TCP client cannot be established.
Running $ less /etc/services shows me that daytime(13) is defined. What could be wrong here?