in reply to Closest-value-in-list Golf!
sub closest { $n=pop;$c=pop;abs$n-$_<abs$n-$c?$c=$_:0for@_;$c } [download]