in reply to Re: net::netmask issue in Strawberry PERL
in thread net::netmask issue in Strawberry PERL
Now, i thought lets try to find out the IP address of a computer using this script and try to change it later on. I was able to figure out the script to find the IP address.
Is there a way I can ping that IP and if packets received is more than or eq 1, I can increase the IP by 1, do the same process and once i get the correct IP , change it using a script ?? I am using the following code now ::--
and getting following expected result ::-- OLD IP: 10.0.0.11use strict; use warnings; use diagnostics; use Net::Netmask; my $result = `ipconfig | find "IPv4 Address"`; ($result) = $result =~ m/(\d+\.\d+\.\d+\.\d+)/; print "OLD IP: $result\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: net::netmask issue in Strawberry PERL
by CountZero (Bishop) on Sep 11, 2011 at 19:06 UTC |