i have a file which has the following lines:
I also have another file as:
I need to do the following task : for each value in file1, i have to check whether that value exists in second field of file2, and if it does, i want to extract out the corresponding "FIRST FIELD" of file2. In short I want smthing like this:
1GEG => a.1.1.1
3RU7 => a.3.2.1
1BXS => a.4.3.5
2JG7 => a.6.7.5
3QWU => NIL
2BHP => a.8.7.9
i have the logic. i know this will work. bt i am not able to get it into proper code. here it is:
read the elements of first file into a hash, and then if the hash key exists for a line I read from the second file, then it obviously existed in the first file.
how do i go about it?