Thanks to all who have helped me out with this one; my first "real" program!
Code snippet:
foreach $element_priv(@priv) { open FILE, "$as_dir/$element_priv" or warn ("Can't open $as_dir +/$element_priv: $!\n"), next; while ($compare_lines = <FILE>) { chomp $compare_lines; next if ($compare_lines =~ /unknown|shutdown/); ($as,$as_name,$neighbor,$router,$interface,$address,$interf +ace_name,$ifindex,$vpi,$vci) = split(' ',$compare_lines); push @{$HoL_compare_priv{$router}}, $interface_name; } } my %no_priv_matches; foreach my $key (keys %HoL_compare_priv) { push @{$no_priv_matches{$key}}, $HoL_compare_priv{$key} unless exists $HoL_priv{$key}; } foreach my $group (keys %no_priv_matches) { print "New interconnects for $group are:\n"; foreach (@{$no_priv_matches{$group}}) { print "\t@{$no_priv_matches{$group}}\n"; } }
When run, prints:
New interconnects for vienna1-nbr2 are: ARRAY(0x1e9184) New interconnects for crtntx1-cr8 are: ARRAY(0x1df388) New interconnects for washdc3-br1 are: ARRAY(0x1e91e4) New interconnects for chcgil2-cr1 are: ARRAY(0x207358)
How can I dereference those array references?

In reply to Dereferencing Hash of Array by Tuna

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.