[lug] Perl 101
John Karns
jkarns at csd.net
Fri Apr 19 12:00:03 MDT 2002
On 18 Apr 2002, Terry Branaman said:
> I found another script in the man pages (which I had to use the -M
> option to read):
> use Net::Ping;
> $p = Net::Ping->new();
> print "$host is alive.\n" if $p->ping($host);
> $p->close();
> However, this didn't work for me either except with the icmp protocol:
> $p = Net::Ping->new("icmp");
Thanks for the reply. Yes, that works. The limitation with using icmp,
is that evidently the script must run with root priviledges, which I can
probably live with.
----------------------------------------------------------------
John Karns jkarns at csd.net
More information about the LUG
mailing list