in reply to Finding the intersect of two ranges
sub overlap { ($_[1] < $_[3] ? $_[1]: $_[3]) - ($_[0] > $_[2] ? $_[0] : $_[2]) + + 1; }
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Finding the intersect of two ranges
by caedes (Pilgrim) on Feb 04, 2003 at 02:21 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2003 at 09:40 UTC |