I am using Net::Ping
to get a host's response time:
my $ping = Net::Ping->new('icmp',2);
my ($ret1,$delay1,undef) = $ping->ping($local);
is the IP of a host on the local network.
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?