in reply to array of arrays or not

It's pretty easy as is:
use List::Util qw/max min/; my @result = map max($s1,$a[$_])..min($s2,$b[$_]), 0..$#a;
and only slightly different using an AoA:
my @result = map max($s1,$_->[0])..min($s2,$_->[1]), @AoA;