my @result = map max($s1,$_->[0])..min($s2,$_->[1]), @AoA;