Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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?
[choroba]: Some modules mention their thread safety in the documentation
[choroba]: if they don't, it's safer to asume they aren't safe
[Discipulus]: maybe one day i'll ask is sopw: like a 9 prove for thread safety will be good

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-09-22 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (260 votes). Check out past polls.

    Notices?