Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 surveying the Monastery: (7)
As of 2016-06-25 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (327 votes). Check out past polls.