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


in reply to Re (tilly) 1: (Golf) Nearest Neighbors
in thread (Golf) Nearest Neighbors

OK, a couple of simple typographic manipulations to bring it to 55:
sub nn { ()=sort{abs$a-$b>abs$_[0]-$_[1]or@_=($a,$b);$a-$b}@_;@_ }
(There are advantages to being slow (or having no time!)).  I was still up over 80 strokes with my sort-based solution when I looked up and saw this guy casually strolling past Tiger Woods.

p