in reply to Merging Two Strings

Under the "last merge" rule of example 3, shouldn't example 2 give 'ATGTATGTA' and example 1 give 'TTTAATTTA'? The rule seems murky.

Is the sequence required to start with $str1? I see you just affirmed this.

I'd approach this by comparing substr's for equality in a loop over offsets, lasting out of the loop at first match.

After Compline,
Zaxo