$val >= $ranges[$range]{stop}) becomes $val > $ranges[$range]{stop})