Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

(boo)Re: Re: Closest-value-in-list Golf -- or, a sorted affair.

by boo_radley (Parson)
on May 29, 2001 at 18:38 UTC ( #83949=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sort{$a<=>$b}keys%h
    
  2. or download this
    sub g {$n=pop;$h{abs($_-$n)}=$_ for@_;$h{(sort keys%h)[0]}}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-09-01 12:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (6 votes), past polls