in reply to One to Many is Too Many?

Although I haven't seen what you've tried, I can guess at it. The key idea here is to read both files into appropriate data structures and then do the merge operation. Things can get convoluted if you open and read from the same file multiple times.

Let's see how well apl's Socratic approach works. :-) If you still find yourself stuck, post your latest attempt, and we'll give you some more pointers.