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

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

Hello, I'm pretty new to programming, and I'd like to know how to find the intersection between many (sometimes 5, sometimes even 20) DNA sequences for which I have the coordinates.

I have found Bio::Range, that does most of the work for me, but I still need some help in how to automate all possible interactions (e.g. seq1 with 2,3,4,5, then seq2 with 1,3,4,5, then seq3 with 1,2,4,5 etc).

I have tried with a for loop, but I would need to manually compute all the possible iterations.

Is there a quicker way?

Thanks

Emanuele