in reply to Getting combinations from a number's digits
This solution is based on the combinational powers of glob()
my $txt = '123'; local $"=','; my @array = glob( "{@{[ split(//,$txt)]}}" x length($txt) ); print Dumper \@array ;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Getting combinations from a number's digits
by Zaxo (Archbishop) on Jul 10, 2006 at 01:28 UTC | |
Re^2: Getting combinations from a number's digits
by mikasue (Friar) on Jul 10, 2006 at 01:13 UTC |
In Section
Seekers of Perl Wisdom