in reply to Re^2: RFC: CPAN module Net::IP::Correct
in thread RFC: CPAN module Net::IP::Correct
Pass it: 192.168.1.0 192.168.2.130use Net::IP; $i=new Net::IP("$ARGV[0]-$ARGV[1]"); @l=$i->find_prefixes(); foreach(@l){ ($i,$m)=split("/"); $i=new Net::IP($i); print$i->short()."/$m\n"; }
Yes it requires a 'bit' of coding, and IMO would be better suited to go into Net::IP instead of a new module.192.168.1.0/24 192.168.2.0/25 192.168.2.128/31 192.168.2.130/32
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: RFC: CPAN module Net::IP::Correct
by arc_of_descent (Hermit) on Jun 30, 2005 at 09:45 UTC | |
by Smylers (Pilgrim) on Jun 30, 2005 at 10:54 UTC |