Dear monks,
I need advice on how to deal with a large amount of ip addresses / subnets.
I know there are modules out there, like Net::Netmask for instance, but I wonder if it could be achieved from core ? This is not a constraint, I'd like to have a discussion on this matter.
For searching / matching purposes :
Let's say I build a hash where the level would match the octets. Something like a tree ... Given IP addresses : ( 10.10.10.1 , 10.11.10.1, 11.10.0.1)
The first level would contain 10 and 11, but the second level of 10 would contain
10, 11 and so on.
Is this a good approach ? I know my whole question is not clear. I'm still confused.
Best regards,
Luc
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.