Like this you can use a linear search forward and backward (or even binary if speed maters) to determine the range limits you wanna find.
Keep in mind that hashes are unsorted but you need to compare neighbors.
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Finding hash key related to closest value
by LanX
in thread Finding hash key related to closest value
by nanophd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |