### ### main: ### - name : trySimpleCombinations000.pl ### sbty : perl ### desc : generate simple combinations from separate arrays ### ### begin_: init perl use strict; use warnings; ### begin_: init vars my @aColor = qw(Red White Blue); my @aAnimal = qw(Cat Rat Dog Mouse); my @aLetter = qw(Alpha Bravo Charlie); my @aDigit = qw(0 1 2 3 4); my @aResult = (); ### begin_: generate combis @aResult = glob ( "{@{[join',',@aColor]}}" ."{@{[join',',@aAnimal]}}" ."{@{[join',',@aLetter]}}" ."{@{[join',',@aDigit]}}" ); ### begin_: show the results print join "\n", @aResult; print ("\n-----------------------------------\n"); 1; __END__ RedCatAlpha0 RedCatAlpha1 RedCatAlpha2 RedCatAlpha3 RedCatAlpha4 RedCatBravo0 . . . BlueMouseCharlie0 BlueMouseCharlie1 BlueMouseCharlie2 BlueMouseCharlie3 BlueMouseCharlie4