in reply to (GOLF) pearls and perl
use strict; my @p = (1,1,1,1,1,1,1,1,2,1,1,1); print perl(),"\n"; sub perl{sub w{my$h=int(($_[1]-$_[0])/2+$_[0]);$"='+';my$o=eval"@p[$_[ +0]..$h]"; my$t=eval"@p[$h+1..$_[1]]";$o<=>$t?(($o<=>$t)==1?($_[0],$h):($h+1,$_[1 +])):undef;} my@r=w(w(0,11));my$v=$p[$r[0]]<=>$p[$r[0]+1];$v?($v==1?$r[0]:$r[0]+1): +$r[1];}
-><- -><- -><- -><- -><-
All things are Perfect
To every last Flaw
And bound in accord
With Eris's Law
- HBT; The Book of Advice, 1:7
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: (GOLF) pearls and perl
by thraxil (Prior) on Apr 04, 2002 at 16:57 UTC |