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
In reply to Re: Problems with Ping
by davorg
in thread Problems with Ping
by magnus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |