http://www.perlmonks.org?node_id=83946


in reply to Re: (boo) Re: Closest-value-in-list Golf!
in thread Closest-value-in-list Golf!

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!"

Replies are listed 'Best First'.
Re: Re: Re: (boo) Re: Closest-value-in-list Golf!
by suaveant (Parson) on May 29, 2001 at 18:45 UTC
    oooooohh... ++
                    - Ant