Llyd has asked for the wisdom of the Perl Monks concerning the following question:

Hi all! I am in dire need of the Net::ping module version for Windows. Fact is my hosting is on a Win2k server, and there is nothing I can do about. Sorry to mention the sickening name in the Monastry, but does anyone know where I can download the Net::Ping Module for Windows? Please let me know at llydapdicter@yahoo.co.uk cos this post will vanish in no time. :) Thanx all! Graeme "Llyd ap Dicter"

Replies are listed 'Best First'.
Re: Net::Ping Module for Windows
by Masem (Monsignor) on Mar 22, 2001 at 04:23 UTC
    Try grabbing Net::PingImproved, which is unsurprisingly an improved version of Net::Ping (duh!), and installing it either in the perl lib directory if you know what you are doing, or in the same directory as your perl scripts that you are working with if you don't or don't have access to the perl library directory. If necessary, add use lib directives to help locate this file.

    (And I wouldn't say that Windows is a bad word here as much as it is on /.; there's a unix bent here, but perl development on Windows is certainly not hampered as much as other languages, thanks to the work of ActiveState perl. And besides, it beats using VB!! :D)


    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
      Due to platform compatibily it doesn't work on Win32, i heard that Activestate is rebuilding something to get it running, i think it's just a problem of time
Re: Net::Ping Module for Windows
by Falkkin (Chaplain) on Mar 22, 2001 at 20:12 UTC
    I'm currently working on fixing Net::Ping in the development version of Perl. (It is my code that is mentioned above as Net::PingImproved.) There are currently 3 types of ping available: ICMP, TCP, and UDP. ICMP os the most accurate, but you need to be running as "root" or "administrator". On Win9X systems this isn't a problem; it's only a problem for NT systems.

    TCP ping didn't previously work in Windows at all, but I've fixed that (i.e. it does work now).

    UDP ping is not very accurate, nor does it work on many systems. At this point in time I'd not recommend using UDP ping. Unfortunately, UDP is the default method in the current Net::Ping.

    To choose one of the other two protocols, do something like this:

    my $p = Net::Ping->new("icmp"); $p->ping("127.0.0.1");

    I'll post the current version of Net::Ping on perlmonks later today, so you can download it. Alternatively, search CPAN for Net::Ping::External, which might also suit your needs (that is, it knows how to ping hosts, and works on windows systems.)