in reply to Closest-value-in-list Golf!
oops :
Warning: Use of "keys" without parens is ambiguous at C:\trash.pl line 8.
my answer is forthcoming, will update.
update you can shave off a few chars by changing
Warning: Use of "keys" without parens is ambiguous at C:\trash.pl line 8.
my answer is forthcoming, will update.
update you can shave off a few chars by changing
to$h{shift@s}
. Don't get too complex, eh? UpdateTime's up!$h{$s[0]}
for a total of 70 chars.sub e {sub n{abs($s-$b)};$s=pop;while($b=pop){if(&n<$d||!$d){$l=$b;$d= +&n}}$l}
In Section
Meditations