in reply to Display all IPs in given range
use NetAddr::IP; my $ip = new NetAddr::IP('10.0.0.0/30'); while ($ip < $ip->broadcast) { print "ip = $ip\n"; $ip ++; }
L*
PS the module also has ->first() and ->last() methods that are what you are looking for.
PPS fixed module link thanks to hippo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Display all IPs in given range
by Noosrep (Novice) on Oct 17, 2016 at 10:30 UTC | |
by Discipulus (Canon) on Oct 17, 2016 at 10:36 UTC | |
by Noosrep (Novice) on Oct 17, 2016 at 13:42 UTC | |
by NetWallah (Canon) on Oct 17, 2016 at 19:46 UTC | |
by Noosrep (Novice) on Oct 19, 2016 at 11:36 UTC |