<?xml version="1.0" encoding="windows-1252"?>
<node id="84441" title="Re: Closest-value-in-list Golf!" created="2001-05-31 02:55:42" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="62512">
mr_mischief</author>
<data>
<field name="doctext">
Not the shortest, but this was what was obvious to me...

&lt;code&gt;

sub c {
  #_123456789_123456789_123456789_123456789_12345
   $i=pop;for(@_){$c=$_ if abs$i-$c&gt;abs$i-$_}$c
}

&lt;/code&gt;

Chris</field>
<field name="root_node">
83923</field>
<field name="parent_node">
83923</field>
</data>
</node>
