Howzabout:
use strict; use warnings; use Data::Dumper; my @AoA; for my $color (qw(red blue)) { for my $size (qw(small medium large)) { push @AoA, [ map { "$color-$size-$_" } 1 .. 4 ]; } } print Dumper(@AoA);
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Combinations / permutations... not even sure what this is called
by roboticus
in thread Combinations / permutations... not even sure what this is called
by tunafish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |