in reply to Boolean logic with IP addresses

The Net::IP module has various functions for manipulating IP addresses, including checking ranges, etc.