I am using the following code to populate a hash with a key and an array of values
How can I perform work on each of the values (i.e. maybe a join) and then print the key with its corresponding list of values?$construct{$record->[1]}{$record->[2]} = 0; foreach my $key (keys %construct) { $construct{$key} = [keys %{$construct{$key}}]; } my %TEST; while ((my $key, my $value) = each %construct) { my @values = @$value; $TEST{$key} = \@values; }
Thanks
In reply to How to print a hash of arrays with the key by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |