in reply to Iterating through all IP addresses in a CIDR
Take a look at Net::Netmask, specifically the enumerate method which will return a list of the IPs within a block