in reply to How do I Gererate Contigs out of a list of sequences?

This should work:
my $str1 = "AATAGCAATTGACAAT"; my $str2 = "CAATCGGAACCAGCAT"; ($concat = "$str1#$str2") =~ s/(.*?)(.*)#\2(.*)/$1$2$3/; print $concat, "\n";
Based on the idea from IO