in reply to Re^3: probably stupid mistake
in thread probably stupid mistake

the problem I am having is that although I also want to get success success (or basically instead of printing that to print $fields1 and $line2 if the if statement is true), I am not getting anything at all

Replies are listed 'Best First'.
Re^5: probably stupid mistake
by gogoglou (Beadle) on Apr 01, 2011 at 14:07 UTC

    or to phrase my problem differently, I want a script that reads each word from a file that in each line there is one word and then reads each line from a second file and if the word from the first file is found in the line of the second to print this line. In theory my script should work, it is working for you but not for me and I really do not understand why.

      it is working for you but not for me and I really do not understand why.
      Do exactly what I did: download your code and 2 input files from your nodes into new files, then run them. If that still doesn't work, then please heed the advice I pointed to in Basic debugging checklist, namely, add lots and lots of print statements to your code. The speed with which you respond to my posts leads me to believe that you have not tried any of these debugging techniques yet.