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);
In reply to Re^2: Next subnet
by jakeease
in thread Next subnet
by ag4ve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |