See threads like finding intermediate range values from two file columns, Calculate the overlap length between two ranges, find the coverage of sequence in a particular range, Match Numeric Range, and Range overlap (with a lot of ranges). In particular, Set::IntSpan will probably do exactly what you want.
Added two more links.
In reply to Re: comparing ranges of numbers between 2 files
by haukex
in thread comparing ranges of numbers between 2 files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |