in reply to Lower-casing Substrings and Iterating Two Files together

So where's your problem, exactly? Why not just simply read one line from data1.txt, read one line from data2.txt, mask the file and then output the result? You'd keep on going as long as there are lines in both files. Maybe if you showed some short and to the point code, we could tell you where to optimize your program.