good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: (boo) Re: Closest-value-in-list Golf!by larryk (Friar) |
on May 29, 2001 at 18:37 UTC ( [id://83946]=note: print w/replies, xml ) | Need Help?? |
sub g {$n=pop;$h{abs$_-$n}=$_ for@_;$h{(sort{$a<=>$b}keys%h)[0]}} 57 if you take out the ( ) on the abs "Argument is futile - you will be ignorralated!"
In Section
Meditations
|
|