in reply to Re^2: Ping host
in thread Ping host
Some notes:
Resulting in e.g. this example, which should also run on e.g. cygwin:
use strict; use warnings; my @hostnames = qw(www.leo.org dhbvg.xxx); foreach (@hostnames){ # my $a = `echo pinging $_ 1>&2 ; ping -c3 $_ 2>&1 | tee -a /dev/tt +y`; my $a = `ping -c3 $_ 2>&1`; if ($a =~ /unreach|unknown host/i){ print " For $_ : problems: $a."; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Ping host
by almut (Canon) on Oct 28, 2009 at 16:37 UTC |