Tuna has asked for the wisdom of the Perl Monks concerning the following question:
When run, prints: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"; } }
How can I dereference those array references?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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Dereferencing Hash of Array
by jeffa (Bishop) on Feb 20, 2001 at 20:53 UTC | |
|
Re: Dereferencing Hash of Array
by TheoPetersen (Priest) on Feb 20, 2001 at 20:53 UTC | |
|
Re: Dereferencing Hash of Array
by mr.nick (Chaplain) on Feb 20, 2001 at 20:40 UTC | |
by Tuna (Friar) on Feb 20, 2001 at 20:45 UTC | |
by mr.nick (Chaplain) on Feb 20, 2001 at 20:51 UTC |