in reply to Re: Looping two files differently
in thread Looping two files differently

Hi VincentK, "you are comparing each line in your first file to every line in your second file"

Yes , i have a "config" file where i can configure the content of the file according to some element/name or etc. then this config file will search through another file(second file) line by line to check if the element/name from my config file exist or not. If yes, then the line will processed further, else if not then it will flag an error message.

"In this case, a match in the first file say on line two could match line 50 in file two ( or multiple lines if files contain duplicates ). Is this what you want?"

YES exactly, let say in the case of duplicate then it doesnt matter because it will be overwritten because i assigned it to a hash

Thank you for your help and the sub that you give as well. I can use the sub as well with a bit of tweak. Thank you