http://qs321.pair.com?node_id=75358


in reply to (Golf) Ordered Combinations

If we don't have to be strict compliant...49.
sub c { @r='';@r=map{$c=$_;map$c.$_,@r}@_ for 1..shift;@r }
(Note: I handle the case of $n=0 correctly. The solution that you started with does not...)