Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: (jeffa) Re: Approximate Matching Key

by baku (Scribe)
on Apr 07, 2001 at 00:36 UTC ( #70595=note: print w/ replies, xml ) Need Help??


in reply to (jeffa) Re: Approximate Matching Key
in thread Approximate Matching Key

Minor typo...

foreach (@keys) { $low = $_ if $_ <= $try; last if $_ >= $try; }

The = was missing in the $low line, so it would miss exact matches. It should still be present on the last line as well, despite my first instinct :-), because we can guarantee to have found a match.


Comment on Re: (jeffa) Re: Approximate Matching Key
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2015-07-06 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls