http://www.perlmonks.org?node_id=164317


in reply to ip address calculations

Net::Netmask is what you need. Can do all the IP/network manipulations you want....