($second_beg>=($first_beg-5)) && ($first_beg<=($second_beg+5))This is the same condition written in two different ways. I think you want something like this:
use List::Util qw(min max); ...; my $overlap = min($first_end, $second_end) - max($first_beg, $second_b +eg) + 1; if($overlap >= 5) { ... };
In reply to Re: Calculate comparison between
by zwon
in thread Calculate comparison between
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |