in reply to How to combine these two files?

Hello chaney123,

Fellow Monk afoken is absolutely right. You need to work on the solution to your problem in your mind first and then put it down to paper. The task is fairly easy even for a beginner. It is not about us providing you with the solution it is about you learning on the process by trying and failing, again and again.

Having said that, there are multiple ways of resolving your problem. One possible way that is as much simple as possible could be:

Step 1: open both files in reading mode (I assume you know how to do that).

Step 2: read the files and place them into arrays, see here how to do that on a relevant question How to populate array with lines from text file? (Moved from Q&A) (close files after putting the data into the arrays).

Step 3: iterate on both arrays (so you can read one line at a time simultaneously). Sample of code on similar question How do I Loop over multiple arrays simultaneously ?. Update: (I just noticed that both files are not equal). So one possible way is to check if the element exist in the array if not, apply next. Experiment and see what are your problems and try to resolve them.

Step 4: Do what ever modification on the lines append to each other based on the data that you have.

Step 5: open a file in writing mode, export the data and you are done. :D

This is a high level implementation, there is a very small tricky point that you need to resolve regarding the data processing. You need to resolve this on your own, remember it is all about trying and failing. If you encounter any problems post your code, tell us where you failed and we will assist.

Hope this gave you a direction of proceeding, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!