CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Grabbing a number and counting letters...

 



Captainrave
New User

Oct 11, 2010, 1:44 AM

Post #1 of 1 (430 views)
Grabbing a number and counting letters... Can't Post

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.


Code
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.


Any ideas?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives