use NetAddr::IP; my $n = NetAddr::IP->new('172.21.3.128/30' ); my $bits = $n->bits(); for my $ip( @{ $n->splitref( $bits ) } ) { print "\t", $ip->addr, "\n"; }
In reply to Re^2: Iterating through all IP addresses in a CIDR
by Anonymous Monk
in thread Iterating through all IP addresses in a CIDR
by grinder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |