
Net::subnet is a simple but fast pure perl module for determining whether a given ip address is in a given set of ip subnets. it's iterative, and it doesn't use any fancy tries, but because it uses simple bitwise operations on strings it's still very fast.
the module supports both ipv4 and ipv6.