Just noting that it would also be simple to get Net::CIDR::Lite to do this with the list_short_range() function, converting simple integer ranges like '5-7' to the separate values. It would be straightforward to just add this functionality also.
Comment on Re: Iterating through all IP addresses in a CIDR