I'm still learning perl. It trying to pull IPs from a infoblox system using their API. According to their API Documentation the "get" method:

"Return an array in list context containing all matching objects. For failures and objects not found, it returns an empty array in list context and undefined in scalar context. When an operation fails, the error code and error message are reported in the status_code() and status_detail() attributes."

So, I'm expecting to get an array of objects (IPs) back after call the get method, however this is not what I am getting. Below is the relevant code and output

CODE : : : my @retrieved_objs = $session->get( object => "Infoblox::DNS::Record::A", name => "nsx10cs.cnti.com" ); print "retrieved_objs[0]: " . $retrieved_objs[0] . "\n"; print "retrieved_objs[1]: " . $retrieved_objs[1] . "\n"; : : :
OUTPUT Infoblox::DNS::Record::A=HASH(0x55d0d1517aa0) retrieved_objs[0]: Infoblox::DNS::Record::A=HASH(0x55d0d1517aa0) retrieved_objs[1]:

It appears to be giving the memory reference to hash, I was expecting ip objects. Any one have any thoughts on where I'm going wrong?


In reply to print a hash reference by vedas

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.