@hostnames = qw(goodhost badhost); foreach (@hostnames){ @a = `ping $_`; print "$_ is Alive\n" if @a =~ (/please check/); } [download]
In reply to Ping host by kingjamesid