![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re^2: Match a Range of IP'sby runrig (Abbot) |
on Sep 30, 2004 at 23:34 UTC ( #395508=note: print w/replies, xml ) | Need Help?? |
NetAddr::IP->new("192.168.1/24")->contains(NetAddr::IP->new($_))Except that the CIDR address you have doesn't match the OP's desired range (192.168.1.0-192.168.99.255), so he'd have to run your code up to 99 times to see if the address is in that range. Or just another way (not tested):
In Section
Seekers of Perl Wisdom
|
|