use strict; use Win32::PingICMP; my $p = Win32::PingICMP->new(); foreach (qw /www.yahoo.com www.cpan.org www.perlmonks.org/) { if ($p->ping($_)) { print "Pinging to $_ took ".$p->details->{roundtriptime}."\n"; } else { print "Pinging $_ unsuccessful: ".$p->details->{status}."\n"; } }
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Pinging multiple hosts
by CountZero
in thread Pinging multiple hosts
by oded_dd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |