I combined my range-to-CIDR with runrig's solution to come up with (tye)Re2: Net::CIDR::Lite ?? (Merge CIDR addresses) that does your nm5.in in under 3 seconds (on my computer), can handle addresses with more than 4 octets, and uses bit-wise operations on strings (which makes it a rather Perlish solution). runrig's method of merging ranges is also rather Perlish.
- tye (but my friends call me "Tye")In reply to (tye)Re2: Challenge Problem: Merging Network Addresses
by tye
in thread Challenge Problem: Merging Network Addresses
by Dominus
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |