in reply to Re^4: Net::Ping output
in thread Net::Ping output
Throw in a sleep 1; there somewhere if you want.my $p = Net::Ping->new(); $p->hires(); my $received = 0; for (1..4) { # 4 is the amount of packets transmitted my ($ret, $duration, $ip) = $p->ping($host, 5.5); $received++ if $ret; printf "Your RTT is %.2f ms\n", $duration * 1000; } printf "Received %i packets\n", $received;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Net::Ping output
by gaurav (Sexton) on Aug 20, 2013 at 14:32 UTC | |
by Anonymous Monk on Aug 20, 2013 at 14:49 UTC | |
|
Re^6: Net::Ping output
by Anonymous Monk on Aug 22, 2013 at 06:43 UTC |