Re: Just chipping in...

[email protected] (Jasper) Fri, 23 Nov 2007 12:02:49 +0000
Newsgroups perl.golf
Message-ID <[email protected]>
On 20/11/2007, Tuomo Salo <[email protected]> wrote:
> This one has no performance issues and is even a little bit shorter. Yay!
>
> #!perl -l
> $r=qr/\((??{$r})*\)/;map/^$r+$/&&print,glob"{(,)}"x2x pop


Just thought of this.

Probably has performance issues and is a little bit longer. Boo!

#!perl -l
$l=2*pop;fork?$l>$c++?$_.='(':exit:$c--?$_.=')':exit while$l--;print

Doesn't order correctly (it would if I added a wait), doesn't print
right, but everyone loves potentially killing their machine with a
fork. Can't get rid of the two exits, so there seems to be flab for
sure
-- 
Jasper