in reply to Creating combinations using arrays
Pretty simple actually...
my @colors = qw/ ***insert colors here*** /; my @sizes = qw/ **** insert sizes here ***/ ; my @shapes= qw/ *** insert shapes here ***/; my @combos=(); foreach my $color(@colors){ foreach my $size(@sizes) { foreach my $shape(@shapes) { push @combos,{ color => $color, size => $size, shape => $shape}; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Creating combinations using arrays
by DreamT (Pilgrim) on Mar 05, 2013 at 16:33 UTC | |
by LanX (Saint) on Mar 05, 2013 at 23:07 UTC |