in reply to Hash of arrays
use strict; use warnings; my %test; for my $i (1..3) { push(@{$test{obj1}{values}},$i); } for my $i (4..6) { push(@{$test{obj2}{values}},$i); } foreach my $key (keys %test) { foreach my $tmpvalue (@{$test{$key}{values}}) { print "$key --> $tmpvalue\n"; } }
|
|---|