in reply to ip address list
this produces a list you are looking for
Maybe there is a better method in the Net::Netmaskuse strict; use warnings; use Net::Netmask; my $block = Net::Netmask->new('192.168.1.128/25'); print "1st element: ", $block->nth(1), "\n"; print "last element: ", $block->nth(-2), "\n"; my $i = 1; while (1) { print "ip adress #$i:", $block->nth($i), "\n"; last if $block->nth($i) eq $block->nth(-2); $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ip address list
by mlebel (Hermit) on Jan 19, 2012 at 17:22 UTC | |
|
Re^2: ip address list
by wwe (Friar) on Jan 20, 2012 at 12:43 UTC | |
by mlebel (Hermit) on Jan 23, 2012 at 13:00 UTC |