for each value in file1, i have to check whether that value exists in second field of file2But you iterate over @arr2 in your code. It might be better to hash the second file, and then go through the first one and print the corresponding hashed value, if it exists, or NIL otherwise.
You might need to chomp the lines if you do not want the \n included in your strings (not needed if the key is always the last thing on any line).
In reply to Re^3: correspondence between two arrays
by choroba
in thread correspondence between two arrays
by anasuya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |