Subject: | is this a bug? |
Date: | Fri, 16 Dec 2011 18:50:43 +0000 |
To: | "bug-Net-Ping [...] rt.cpan.org" <bug-Net-Ping [...] rt.cpan.org> |
From: | Martin Smith <martin [...] backupsystems.co.uk> |
Net::Ping is up to date (2.36)
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Linux bk508.localdomain 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
--
[root@bk508 log]# cat x.pl
use Net::Ping;
my $p = Net::Ping->new();
my ($ret, $duration, $ip) = $p->ping("192.168.1.73");
print ("($ret, $duration, $ip)\n");
[root@bk508 log]# perl x.pl
(0, 5, 192.168.1.73)
According to cpan page zero indicates unreachable...... but looks good;
[root@bk508 log]# ping "192.168.1.73"
PING 192.168.1.73 (192.168.1.73) 56(84) bytes of data.
64 bytes from 192.168.1.73: icmp_seq=1 ttl=128 time=1.06 ms
64 bytes from 192.168.1.73: icmp_seq=2 ttl=128 time=0.411 ms
64 bytes from 192.168.1.73: icmp_seq=3 ttl=128 time=0.555 ms
64 bytes from 192.168.1.73: icmp_seq=4 ttl=128 time=0.419 ms
Is this a bug, or am I not understanding?