Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: ip address list

by mlebel (Hermit)
on Jan 19, 2012 at 17:22 UTC ( #948822=note: print w/replies, xml ) Need Help??

in reply to Re: ip address list
in thread ip address list

Thanks wwe! It does just about what I need. I have modified it slightly to get the results that I was looking for. Here is the code:

#!/usr/bin/perl use strict; use warnings; use Net::Netmask; my $block = Net::Netmask->new(''); my $i = 1; while (1) { print $block->nth($i), "\n"; last if $block->nth($i) eq $block->nth(-2); $i++; }

All I need to do now is to find a way to remove the first ip(the gateway ip)... any suggestions? thanks

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://948822]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2016-10-28 01:37 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (374 votes). Check out past polls.