Apologies if this seem like a simple question, I'm working on learning the more advanced topics in perl.

I'm having trouble pulling information out of data an array reference. I'm trying to print data that returned from the aliases method. Would anyone be able to tell me what I'm doing wrong?

#:Code #!/usr/bin/perl # use strict ; #use lib "/var/www/html/monkey/cgi-bin"; use lib "/var/www/html/production/cgi-bin"; # load the WebUI common libraries use Infoblox::WebUI ; use Data::Dumper; my $session = Infoblox::Session->new( master => $address, username => $user, password => $passwd, timeout => $timeout_num, connection_timeout => $conn_timeout ); print "Check:".Infoblox::status_code() . ":" . Infoblox::status_detail +()."\n"; unless ($session) { die("Construct session failed: ", Infoblox::status_code() . ":" . Infoblox::status_de +tail()); } #Get DHCP Host Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host", name => "testone.cnti.com", ); #my @tmp_array = @$_->aliases() for (@retrieved_objs); #print "aliases: " . @tmp_array; print "aliases: " .$_->aliases(),"\n" for (@retrieved_objs); print "dns_name: " . $_->dns_name(),"\n" for (@retrieved_objs); print "ipv4addrs: " . $_->ipv4addrs(),"\n" for (@retrieved_objs); print "comment: " . $_->comment(),"\n" for (@retrieved_objs); print "name: " . $_->name(),"\n" for (@retrieved_objs);: : : :OUTPUT [user1@host perl]$ ./infoblox_test4.pl Check:0:Operation succeeded aliases: ARRAY(0x55f6da24f8f0) dns_name: testone.cnti.com ipv4addrs: ARRAY(0x55f6da243eb0) comment: Standard Network: [TAGS: STATIC;cc.cnti.com] name: testone.cnti.com zone: cnti.com ttl: 300

In reply to printing an array 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.