Lloyd, Steve wrote:

I recently upgraded from 5.8.4 to 5.8.6 and had problems with Net::Ping and sockets. Once I went back to 5.8.4, it all worked fine. After doing some research on the web, I found that there were socket changed in 5.8.6 that caused some major problems with socket calls. I recommend to stick with 5.8.4 for now.. Steve Lloyd
http://www.basgetti.com
    -----Original Message-----
    *From:* [EMAIL PROTECTED]
    [mailto:[EMAIL PROTECTED] *On
    Behalf Of *henry
    *Sent:* Tuesday, May 24, 2005 3:48 PM
    *To:* [email protected];
    [email protected]
    *Subject:* Net-Ping

    Hi all,
The following script has worked fine for a couple of years on 5.6.
    Since getting my new machines and installing 5.8, it doesn't work.
    It simply works for a few IPs and then just stops without errors.
    Did anything change with Net-Ping? Any thoughts, ideas are greatly
    appreciated...
use Net::Ping;
    my $ui;
    my $p;
    my $s;
    my $i;
    open (NBTOUT, ">nbtoutA.txt") or die "\n\nCould not open
    NBTOUTA.txt output file. ";

    for ($s = 250; $s < 252; $s++) {
        for ($i = 11; $i < 255; $i++) {
            $p = Net::Ping->new();
            $host = "192.168.$s.$i";
            if ($p->ping($host,3)) {
                print "Trying 192.168.$s.$i\n";
                print NBTOUT "Trying 192.168.$s.$i\n";
                $ui = `nbtstat -a 192.168.$s.$i`;
                print NBTOUT $ui;
                }
            $p->close();
            }
        }
-Henry

This email, and any files or previous email messages included with it, may contain confidential and/or privileged material. If you are not the intended recipient please contact the sender and delete all copies.

------------------------------------------------------------------------

_______________________________________________
Perl-Win32-Admin mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
I had the same problem and I was able to get it to work by using UDP pings. Look in the docs, you will see how to use UDP instead of ICMP, which I believe is the default.

--
--Moby

They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety.  -- Benjamin Franklin

First they came for the Jews and I did not speak out because I was not a Jew.
Then they came for the Communists and I did not speak out because I was not a 
Communist.
Then they came for the trade unionists and I did not speak out because I was 
not a trade unionist.
Then they came for me and there was no one left to speak out for me. -- Pastor Martin Niem�ller
_______________________________________________
Perl-Win32-Admin mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to