I don't know puppet so I don't know it's input requirements, but I'm not seeing the issue. iptables (on Linux) accepts CIDR blocks as arguments to --source and your input is CIDR blocks, how about print or say?

As for the other, less obvious "question" (Given a CIDR block, how do I see who owns it?), all that comes to mind is brute force: look up each and every IP address in each of every CIDR block. The reason you need to do ALL of them is because people who sell hosting resell individual IPs from from CIDR blocks. On the other hand, you might find some of ARIN's web tools of use, if you're not worried about being wrong sometimes (e.g. resold IPs).

Even if he is getting a bit snarky, I agree with boftx that "you're a saint, you shouldn't have to be reminded to give examples of input and output."


In reply to Re: Ideas solicited: Using Perl to sort through Toxic CIDR blocks by Anonymous Monk
in thread Ideas solicited: Using Perl to sort through Toxic CIDR blocks by blue_cowdawg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.