Try NetAddr::IP
In reply to Re: Iterating through all IP addresses in a CIDR by holo in thread Iterating through all IP addresses in a CIDR by grinder