Re: Just chipping in...

[email protected] (Jasper) Thu, 15 Nov 2007 15:05:14 +0000
Newsgroups perl.golf
Message-ID <[email protected]>
On 15/11/2007, Jasper <[email protected]> wrote:
> On 15/11/2007, Phil Carmody <[email protected]> wrote:
> > I saw this on sci.math, and thought "one liner" ;-)
> > I even think a DP non-recursive approach should be quite quick.
> > Keeping the output in the logical order might cost a few strokes.
>

and (mostly) with a regex :):wq

\$h{$_='()'x$ARGV[0]};
while(/\)\(/){
  s/\)(.*?)\(/$1()/;
  \$h{$_,reverse};
}
print for sort keys %h;




-- 
Jasper