in reply to compare two files to get a match

Anonymousquestion are welcome but.. what have you tried so far and where you encountered problems?

Try to translate into Perl a simple manual procedure, this normally works.

Me and others monks are happy to (try to) help you but is better to help you to code better than offer you solutions you may not understand.

try my first suggestion and post some code.

In addition i see that third column of mapped.txt is NC_002755.2 (counting from zero) or ref counting from 1: how can this lie between 1..1524 ? You want to compare every line of first file against every line of the second one?

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.