CIDR cleanup

Not Perl, though this may be useful depending on your environment:
https://github.com/rus-cert/compress-cidr

The examples are for IPv6, though I use it to consolidate lists of IPv4 in a variety of jobs/scripts without issue. YMMV.