On Thu, Oct 31, 2002 at 05:27:39PM +0000, Ben Edwards wrote:
> Restarting  hasn't worked for me, I'm afraid.. Could this be a Perl version thing? I 
>am using 5.005.

Not perl in and of itself, although I can't say anything about the binary
you're using. ;)   It's almost certainly not perl though.  Here's an
easy test though:

$ perl -e 'print join("\n",getservbyname("echo","tcp"),"")'

you should get something back like:

echo

7
tcp


Then try "telnet localhost echo".  If echo was found, you'll either
connect to your own echo port, or you'll get connection refused.  If echo
wasn't found, you'll get an error saying something like "bad port".

The echo thing, BTW, is part of Net::Ping.  The above is the same code
as Net::Ping:

        $self->{"port_num"} = (getservbyname('echo', 'tcp'))[2] ||
            croak("Can't get tcp echo port by name");

-- 
Randomly Generated Tagline:
I would estimate that the number of programs it breaks in the world
 will be less than 10.  As long as one of those 10 isn't CGI.pm, we're
 probably okay.
              -- Larry Wall in <[EMAIL PROTECTED]>

Attachment: msg09777/pgp00000.pgp
Description: PGP signature

Reply via email to