Ping a host : Ping « Network « Perl






Ping a host

   


use Net::Ping;

$pingobject = Net::Ping->new(icmp);

if ($pingobject->ping('cpan.org')) {print "Could reach CPAN."};

$pingobject->close();

   
    
    
  








Related examples in the same category

1.Send a TCP or UDP ping