in reply to Ping a list of servers

Couple of things to look at:

  • You did not specify ICMP (UDP is default, but ping uses ICMP)   '$p = Net::Ping->new("icmp");'
  • To use ICMP you must be 'root' or have appropriate privledge to send ICMP packets
  • from the Net::Ping docs

    You may choose one of four different protocols to use for the ping. The "udp" protocol is the default. Note that a live remote host may still fail to be pingable by one or more of these protocols. For example, www.microsoft.com is generally alive but not pingable...

    If the "icmp" protocol is specified, the ping() method sends an icmp echo message to the remote host, which is what the UNIX ping program does. If the echoed message is received from the remote host and the echoed information is correct, the remote host is considered reachable. Specifying the "icmp" protocol requires that the program be run as root or that the program be setuid to root.



    grep
    Mynd you, mønk bites Kan be pretti nasti...

    Replies are listed 'Best First'.
    Re: Re: Ping a list of servers
    by Kickstart (Pilgrim) on Oct 18, 2002 at 23:04 UTC
      Thank you...that did the job (I guess I can't take examples from perlmonks.org as perfect!)!

      Kickstart