http://qs321.pair.com?node_id=634407

traveler has asked for the wisdom of the Perl Monks concerning the following question:

I am using Net::Ping to get a host's response time:
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";
$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?