Re: Next subnet

2013-05-27 Thread Dr.Ruud
On 27/05/2013 23:55, shawn wilson wrote: On May 27, 2013 1:02 PM, "Dr.Ruud" mailto:rvtol%2buse...@isolution.nl>> wrote: > On 26/05/2013 14:40, shawn wilson wrote: >> Thank y'all, I got to where I want to be: >> https://github.com/ag4ve/geocidr > > > ... > > or grep { ! m%[0-9\.\/]+% } @{

Re: Next subnet

2013-05-27 Thread shawn wilson
On May 27, 2013 1:02 PM, "Dr.Ruud" wrote: > > On 26/05/2013 14:40, shawn wilson wrote: > >> Thank y'all, I got to where I want to be: >> https://github.com/ag4ve/geocidr > > > > ... > > or grep { ! m%[0-9\.\/]+% } @{$opts->{ip}} > > or scalar(@{$opts->{ip}}) < 1 > > The '+' in the regexp is superf

Re: Next subnet

2013-05-27 Thread Dr.Ruud
On 26/05/2013 14:40, shawn wilson wrote: Thank y'all, I got to where I want to be: https://github.com/ag4ve/geocidr > ... > or grep { ! m%[0-9\.\/]+% } @{$opts->{ip}} > or scalar(@{$opts->{ip}}) < 1 The '+' in the regexp is superfluous as-is. (your regexp isn't anchored) You probably meant

Re: Next subnet

2013-05-26 Thread shawn wilson
Thank y'all, I got to where I want to be: https://github.com/ag4ve/geocidr On Sun, May 26, 2013 at 8:06 AM, Michael Rasmussen wrote: > On Fri, May 24, 2013 at 03:18:35PM -0400, shawn wilson wrote: >> How do I find the next subnet? This should print 192.168.1.0 the >> sec

Re: Next subnet

2013-05-26 Thread Michael Rasmussen
On Fri, May 24, 2013 at 03:18:35PM -0400, shawn wilson wrote: > How do I find the next subnet? This should print 192.168.1.0 the > second time - it errors: [code deleted] Why should it? The Net::IP documentation doesn't provide any information about actions that cross the subnet bound

Re: Next subnet

2013-05-25 Thread Dr.Ruud
On 24/05/2013 21:18, shawn wilson wrote: How do I find the next subnet? This should print 192.168.1.0 the second time - it errors: #!/usr/bin/env perl use strict; use warnings; use Net::IP; my $ip = Net::IP->new('192.168.0.0/24'); print "Start ip [" . $ip->ip

Next subnet

2013-05-24 Thread shawn wilson
How do I find the next subnet? This should print 192.168.1.0 the second time - it errors: #!/usr/bin/env perl use strict; use warnings; use Net::IP; my $ip = Net::IP->new('192.168.0.0/24'); print "Start ip [" . $ip->ip . "]\n"; print "start mask [