Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 rats come out to play...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2016-12-09 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.