Have a look at Array::IntSpan.
In reply to Re: hashing intervals by hdb in thread hashing intervals by baxy77bax