Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Closest-value-in-list Golf!

by mr.nick (Chaplain)
on May 30, 2001 at 22:47 UTC( #84342=note: print w/replies, xml ) Need Help??


in reply to Closest-value-in-list Golf!

Hm. I used a different approach, and if my eyes don't deceive me, it's the lowest score yet. Update: No it's not ... damn:
sub g { # 1 2 3 4 5 # 1234567890123456789012345678901234567890123456789012 $n=pop;$,=pop;$,=abs$n-$_<abs$n-$,?$_:$,for@_;$, }
for a score of 48.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://84342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2016-08-30 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (417 votes). Check out past polls.