![Perl ping Perl ping](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
<pre name="code" class="html">use Net::Ping;
$p = Net::Ping->new("icmp");
while (1==1){
open (LIST,"<","list.txt") || die "$!\n";
while (<LIST>)
{chomp;
my $host=$_;
if ($p->ping($host))
{print "$host is alive\n";}
else
{print "$host is die\n"};
}
close LIST;
sleep(5);
} 192.168.11.1
192.168.10.1
192.168.5.1