in reply to Net::Ping just don't werk

I was more than surprised to say the least - check this:
#!/usr/bin/perl use Net::Ping; $p = Net::Ping->new('icmp'); print "She's workin\n" if $p->ping("ns.online.no"); $p->close();
Works fine! HOWEVER
#!/usr/bin/perl use Net::Ping; $p = Net::Ping->new(); print "She's workin\n" if $p->ping("ns.online.no"); $p->close();
Will not!
JP

Replies are listed 'Best First'.
RE: Re: Net::Ping just don't werk
by geektron (Curate) on Nov 02, 2000 at 05:47 UTC
    i ran into this problem a while back.

    Net::Ping requires UID 0 ( as already noted ) to run ICMP pings.

    the other services ( TCP and UDP ) need to be implemented and accessible on the receiving host. the default proto is UDP according to the docs.