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"; } }
In reply to Re: Hash of arrays
by Roy Johnson
in thread Hash of arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |