in reply to Re: Re: The Best Hash
in thread The Best Hash
If the value is a string value you may be able to use one of the distance modules on CPAN to calculate the closest match in a loop through all of the hashs if numeric you can put your test in a loop with a local var to see what is closest -- though the way you do this totally depends on the data in the key/value pairs. for example if you have an exact match do you need to stop? or do you need to find ALL exact matches? Do you need to find all close matches that are a certain distance from the mean or all the hash key/val pairs or does the match need to match the outside value? More info will get you a better answer here. You cant kill us with information, you can only make the responces more true to your actual situation.
-Waswas