Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re (tilly) 1: (Golf) Ordered Combinations

by tilly (Archbishop)
on Apr 25, 2001 at 06:51 UTC ( #75358=note: print w/ replies, xml ) Need Help??


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...)


Comment on Re (tilly) 1: (Golf) Ordered Combinations
Download Code
Re: Re (tilly) 1: (Golf) Ordered Combinations
by MeowChow (Vicar) on Apr 25, 2001 at 07:20 UTC
    (Note: I handle the case of $n=0 correctly. The solution that you started with does not...)

    I can't slip anything past you, can I? :-)

       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
      Is there any way to print these results to a file?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://75358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-12-20 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (99 votes), past polls