in reply to finding if an ip is in a subnet

Sounds pretty much like what Net::CIDR::Lite is for.