Louis,
    I use something like this in all of my scripts...
use Net::Ping;
my $host = Net::Ping->new("icmp");

while (<MACH>) {
        chomp ($client = $_);
        $client =~ tr/a-z/A-Z/;
        if ($host->ping($client, 5)){&determine}
        else {print UNREACHABLE ("$client was unavailable for communication\.\n: 
$!")}
                }
Hope this tid bit helps...

>From: "Edward G. Orton" <[EMAIL PROTECTED]>
>To: "Louis Selvon" <[EMAIL PROTECTED]>,   
><[EMAIL PROTECTED]>
>Subject: Re: Has anyone been successful at using the Net::Ping module ??
>Date: Tue, 27 Nov 2001 22:29:50 -0500
>
>
>----- Original Message -----
>From: "Louis Selvon" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, November 28, 2001 10:58 AM
>Subject: Has anyone been successful at using the Net::Ping
>module ??
> >
>
> >Hi:
> >
> >I have tried in vain to get the Net::Ping module to work, but
>every single
> >hostname I tried to ping using perl ping module is telling me
>that the
> >hostname is not alive.
> >
> >I have tried all tcp, udp, and icmp options with no luck.
> >
> >When I ping normally at the command line, tells me that
>hostname is alive.
> >
> >Does the Net::Ping module actually work ??
> >
> >Louis.
>I've been using it since ActivePerl build 509 (I'm at 628 now).
>No problems.
>Try something like:
>$p = Net::Ping->new($protocol, $timeout) || die "Can't open new
>ping with $protocol, $!";
>
>This will at least let you know whether or not your "new" worked
>or not.
>
>ego
>Edward G. Orton, GWN Consultants Inc.
>Phone: 613-764-3186, Fax: 613-764-1721
>email: [EMAIL PROTECTED]
>
>_______________________________________________
>Perl-Win32-Admin mailing list
>[EMAIL PROTECTED]
>http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to