Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Challenge Problem: Merging Network Addresses

by hatter (Pilgrim)
on Oct 12, 2001 at 12:41 UTC ( #118427=note: print w/replies, xml ) Need Help??


in reply to Re: Challenge Problem: Merging Network Addresses
in thread Challenge Problem: Merging Network Addresses

I'd thought about doing it similarly, but in a bit more detail:

o Convert the addresses to binary strings, and remove the bits that represent the network (so a /32 becomes a 32 char long string, a /24 24 bits)
o For each line, see if there is a matching line, except with opposite LSB - if there is, delete them and replace it with a string one digit shorter.
o Repeat until you run out of matches.

the hatter

  • Comment on Re: Re: Challenge Problem: Merging Network Addresses

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://118427]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2018-01-23 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (238 votes). Check out past polls.

    Notices?