in reply to Pinging multiple hosts
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
|
|---|