in reply to Re: Merge CIDRs
in thread Merge CIDRs
You need to sort by start address. You're lucky that your input data was already sorted by such.
Also, you have to look for $rs <= $ce + 1 rather than $rs == $ce + 1, or you end up not coalescing things like 0-7 (0.0/3), 4-7 (4.0/2), which should just get swallowed.
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Merge CIDRs
by Dominus (Parson) on Oct 15, 2001 at 09:50 UTC |
In Section
Cool Uses for Perl