use NetAddr::IP; print "My address space contains the following /24s:\n", join("\n", NetAddr::IP->new('10.0.0.0/22')->split(24)), "\n";