Here's the final piece that you needed, which was to dereference the hash info using the value of the key $code:
use strict; use warnings; + my $info = { 'last' => [ 'jones', 'smith', 'long' ] }; + + foreach my $code ( keys %{$info} ) { print $code . ":"; foreach my $last ( @{$info->{$code}} ) { print " " . $last; } print "\n"; }
In reply to Re: printing hash of array
by liverpole
in thread printing hash of array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |