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


in reply to Module for working with IP Addresses and Ranges

Not sure on how you're judging suckage, but Net::Netmask includes the helper function range2cidrlist that will turn an arbitrary range into an equivalent array of CIDRs (actually, Net::Netmask objects):-

my $is_in_range = grep $_->match($ip_x), range2cidrlist($ip_range_start, $ip_range_end);

(match is a Net::Netmask method.)

    --k.