7 lines
145 B
Perl
7 lines
145 B
Perl
|
use Net::Ping;
|
||
|
|
||
|
$pingobject = Net::Ping->new(icmp);
|
||
|
|
||
|
if ($pingobject->ping('cpan.org')) {print "Could reach CPAN."};
|
||
|
|
||
|
$pingobject->close();
|