in reply to Closest-value-in-list Golf!
sub g{%_=map{abs($_[-1]-$_[$_]),$_}(0..@_-2);$_[$_{(sort{$a<=>$b}keys% +_)[0]}]} [download]
"Argument is futile - you will be ignorralated!"