in reply to Problems with Ping
Here's a simple example of using Net::Ping, perhaps it will help you find your problem.
--#!/usr/bin/perl -w use strict; use Net::Ping; my $host = shift or die "No host specified.\n"; my $p = Net::Ping->new; my $res = $p->ping($host); die "Unknown host $host\n" unless defined $res; print "$host is ", $res ? 'alive' : 'dead', "\n";
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problems with Ping
by magnus (Pilgrim) on Feb 07, 2001 at 16:49 UTC |