http://www.perlmonks.org?node_id=770272

hifirock has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
How can we find the overlap between number ranges.
For example i have five number ranges
a) 1 .. 10
b) 11 .. 20
c) 15 .. 25
d) 21 .. 30
e) 25 .. 35
In the above example 'c' and 'e' overlaps with rest of the ranges. How can i find out the particular range is overlapping?
can anyone help me to sort out the problem?