[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Fun With Golf





On Wed, 18 Oct 2000, Ian Phillipps wrote:
> On Thu, 19 Oct 2000 at 00:16:59 +0300, Ilmari Karonen wrote:
> 
> > So what's wrong with the arithmetic approach?
> >   sub hole {$_&&(abs($_)-1)%9+1}
> 
> Nothing (see my entry to the golf match), except that it should be $_[0]
> not $_.

Oops, easily fixed at the cost of two strokes:

      sub hole {"@_"&&(8+abs pop)%9+1}

And now I see that the $_ version could've been two strokes shorter..

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"Maybe I shouldn't be singing this song / Ranting and raving and
 carrying on / Maybe they're right when they tell me I'm wrong...
 NAAAAH!"  -- Denis Leary, _Asshole_



==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe