in reply to Gurus, please point me in the right direction; complicated operations desired for DNA sequence formating
Don't know if it's relevant to your project, but bioperl might be of interest to you
Also, your description implies that there might be spaces in file1 between each character. However, you might've just added them to make your question more readable. Either way, you could use the following code to process each line two characters at a time.
After that it's just doing your comparison and outputting to a new file from what you describe.
while (<DATA>) { chomp; my @letters = m/(\w)/g; while (@letters) { my $x = shift @letters; my $y = shift @letters; print "($x, $y) "; } print "\n"; } __DATA__ T G T T T G T C A A C G G C T C T G G C
|
|---|