>use Net::Ping;
>$p = Net::Ping->new('icmp',2);
>
>if($p->ping($client) == 1){
>       print "$client exists\n";
>}else{
>       print "No ping on $client\n";
>}

This is more or less what I have as well. As I said I tried all tcp, udp, and
icmp.

>The 'icmp' part is important because my windows clients would not respond to
the default when I first tried it.

*** I see. Well mine is actually being tried via the browser, after uploading
to my domain web space. I have not tried the script on Windows or DOS prompt .
the script is suppose to check each hostname from a form query, using the ping
module from Perl.

>Is it returning 1, 0, or undef?  
 
*** It's returning 0 all the time for any hostname I tried. Whether I put the
actual IP or the format www.yourdomain.com, the output is the same. 

>Are you including backslashes in your
query?  

*** I don't have my code in front of me, but I don't think I am. Need to
doublecheck on this.

>Does it work if you use the same program shelling out the ping using
backticks or system()?

What do you mean ? 

I have tried just by typing "ping hostname" from the DOS command prompt, and
it tells me that hostname is alive.

Is there another way to try a ping test for browser based queries ??


Thanks for your feedback

Louis.

-----Original Message-----
From: Louis Selvon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 7:58 AM
To: [EMAIL PROTECTED]
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.

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


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.

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


Reply via email to