http://qs1969.pair.com?node_id=67533

Item Description: Manipulates IP addresses, masks, and subnets

Review Synopsis:

Description
NetAddr::IP provides a simple interface to the tedious bit manipulation involved when handling IP address calculations. It also helps by performing range comparisons between subnets as well as other frequently used functions such as:

It can also return results in either CIDR notation (10.1.1.1/24) or regular Mask notation (10.1.1.1 255.255.255.0). You can also return addresses without masks, or masks without addresses.

Who should use it?

Anyone who needs to perform complex operations on IP addresses, such as determining a subnet address for a given address, or a quick way to determine if address/subnet A is in subnet B. Saves a lot of time with binary conversions.

Who should NOT use it?

Anyone who is running on a system that may have endian problems -- the author clearly states in the documentation that it has not been extensively tested on a range of platforms. Be careful.

Documentation

Complete and very well presented, with plenty of examples.

Personal Notes

I've used this module extensively for subnet determination and address manipulation, and it worked extremely well (at least on Linux/Intel, there were no endian problems). The documentation is clear and simple. Recommended!