Oct 11, 2010, 1:44 AM
Post #1 of 1
Hi all, it has been a long while since I have needed to do any Perl coding! How easy is the following to do? For once I have a good idea what I need to do (makes a change), but this time I have forgotten HOW to do it.
Grabbing a number and counting letters...
File 1 (csv file), for each line: store the number in column 4 (lets call it X)
Goto File 2 (.txt and a long string of letters), count each character until X is found.
At X, add 1 and count how many characters until TAG, TAA or TGA are reached (call this Y).
At X, add 2 and count how many characters until TAG, TAA or TGA are reached (call this Z).
Add Y and Z to new columns in File 1 at the end of the line where X was found.
Goto back to File 1, goto the next line and repeat.