Re: bad code to good golf
[email protected] (robert wilson) Sun, 9 Dec 2007 05:24:26 -0500
| Newsgroups | perl.fwp |
|---|---|
| Message-ID | <[email protected]> |
On Sunday 09 December 2007, Michael G Schwern (Michael G Schwern <[email protected]>) wrote: > sub new {bless{@_[1..$#_]},shift} > > Was my first shot at 23. Then I figured I could knock off that range op... my first shot was 23 also... sub new{($a,@b)=@_;bless{@b},$a} then i came up with this 21 a few seconds later: sub new{bless{splice@_,1},pop} i think that's the best i can do... i'll be very impressed if anyone does better than 21.