in reply to regex for classless IP subnets
(The manual implies that qualifying IP_B_IN_A_OVERLAP is not necessary, but it seems to be).use strict; use Net::IP; my $net = new Net::IP("10.4.5.0/24"); my $host = new Net::IP("10.4.5.1"); print "yes\n" if ($net->overlaps($host) == $Net::IP::IP_B_IN_A_OVERLAP +);
HTH, --traveler
|
|---|