I have two files containing data that i would like to compare.
Both files contain key value(common key) that i would like to match and print out. What would be most efficient method of doing a comparison?
some_data key some_data
different_data different_data key
I opened both files and add one file to array and the other to hash then did comparison based on the key using nested for loops. Would there be better method of comparing?
thank you in advance.
Sorry for the lack of clarity in my question.
I have a list of all the employee's names in one file and the other fi
+le has some names from some department.
Input All employee file:
Input Dept file:
HR John Smith 6th floor
R&D Terry Smith 5th floor
I would like output to be if John Smith in Dept file exists in All emp
+loyee file, print out his info.
Hope that helps clear the question a bit.
Thanks for your advice. Will definitely read the how not to ask questi