traveler has asked for the wisdom of the Perl Monks concerning the following question:
$local is the IP of a host on the local network.use strict; use warnings; use Net::Ping; my $ping = Net::Ping->new('icmp',2); $ping->hires; my ($ret1,$delay1,undef) = $ping->ping($local); print "($ret1,$delay1)\n";
I get $ret always == 1 (so the ping was "successful"). $delay1 can be 0, 2.0, or some reasonable delay. The host is not "close" so a 0 second delay is unreasonable. A delay of 2.0 clearly means the host is not reachable. What is the difference between 0 and 2 given that $ret is always 1?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::Ping results question
by ikegami (Patriarch) on Aug 22, 2007 at 16:50 UTC | |
by traveler (Parson) on Aug 22, 2007 at 16:57 UTC | |
by ikegami (Patriarch) on Aug 22, 2007 at 17:31 UTC | |
by traveler (Parson) on Aug 22, 2007 at 17:43 UTC |