in reply to Re: Next subnet
in thread Next subnet

or this:

#!/usr/bin/env perl use warnings; use strict; use Net::IP; my $ip = new Net::IP ('192.168.0.0 - 192.168.3.255' ) || die ; # Loop do { print $ip->ip(), "\n"; } while (++$ip);

Same example, different range; here it crosses two byte boundaries.

#!/usr/bin/env perl use warnings; use strict; use Net::IP; my $ip = new Net::IP ('10.168.254.0 - 10.169.1.255' ) || die ; # Loop do { print $ip->ip(), "\n"; } while (++$ip);