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. ";
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
_______________________________________________ Perl-Win32-Admin mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
