in reply to Comparing arrays

Hi,

to your first question: "Why is this?"

It's because you compare the indexes of the arrays and not the values of the arrays. Your code:

if ($falsefriend eq $ bilingualword) { print OUTPUT1 “$falsefriend"\n"; }

But there are some more errors:
a) The upper bound of the two loops is always the length of array words whereas one of them should be words2.
b) You declare the arrays words and words2 with my in a block. So they are lexically scoped. Afterwards you want to access them. If you like to do this, you have to declare them outside of the filling block.
c) You have done an exact string compare with 'eq' and not a substring match what you want to achieve. So compare the strings with the match operator.