I want to be able to define a number (n) and get a print of all possible combinations of the number 1..n
For example:
my $n = 2
OUTPUT: 1 , 2 , 12
my $n = 3
OUTPUT: 1 , 2 , 3 , 12 , 13 , 23 , 123
etc.
I've been trying to wrap my head around a clean way to do this but thought the monks may be able to come up with a good answer.
Thanks in advance,
Austin
In reply to All possible number combinations in perl by austinj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |