in reply to (Golf) Building a Better Binary Tree
Those complaining about strict.pm are invited to substitute $a and $b for $x and $s respectively. (Just to demonstrate that becoming strict does not necessarily result in clearer code...)sub h { #23456789_123456789_123456789_123456789_123456789_1234 $x=0;$s=shift;$x={$_,[$x,0]}for sort{&$s($a,$b)}@_;%$x }
UPDATE
Updated per dragonchild's point about the spec misunderstanding. (How did this get updated? Well let me just say that after conferring with the
author of the post, a kind janitor did the favour of editing it...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: (Golf) Building a Better Binary Tree
by dragonchild (Archbishop) on Oct 08, 2001 at 20:45 UTC | |
|
Re (tilly) 2: (Golf) Building a Better Binary Tree
by tilly (Archbishop) on Oct 08, 2001 at 20:38 UTC | |
|
Re: Re (tilly) 1: (Golf) Building a Better Binary Tree
by jynx (Priest) on Oct 09, 2001 at 21:42 UTC | |
by tilly (Archbishop) on Oct 09, 2001 at 22:27 UTC |