Hello. I'm trying to make a perl script that gets the ip range from a certain AS. I'm using the Net::Whois::RIPE package for it. I'm a beginner in perl and i'm stuck soon. The output that I get from my code is.
Net::Whois::RIPE::Object=HASH(0x315a608)Net::Whois::RIPE::Object=HASH( +0x315c9f0) Net::Whois::RIPE::Object=HASH(0x315ccb4)Net::Whois::RIPE::Object=HASH( +0x315d068) Net::Whois::RIPE::Object=HASH(0x315d32c)Net::Whois::RIPE::Object=HASH( +0x315d6e0) Net::Whois::RIPE::Object=HASH(0x315d938)Net::Whois::RIPE::Object=HASH( +0x315dc50) ...
Here's my code:
use Net::Whois::RIPE; use strict; use warnings; my $server = "whois.ripe.net"; my $as = "LEASEWEB"; my $whois = Net::Whois::RIPE->new($server); my @output = $whois->query($as); foreach my $line (@output) { print $line; } exit;
Once I get the output I think i'll be able to filter out the ip ranges. Thx in advance

In reply to Ripe Whois lookup by marto9

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.