in reply to File comparison

Your code works for me... with two files that are equal -- ie, identical.

Check your files: does one have a trailing space, a newline or other byte that's not present in the other.

Replies are listed 'Best First'.
Re^2: File comparison
by vparikh (Novice) on Jul 17, 2012 at 17:59 UTC
    I think I know what the problem is. I am creating both files in the same script above and then I have this code to compare. But if I put the comparison code in a different file, it works!
      Are their file handles closed before comparsion?
      Sorry if my advice was wrong.
        Oh no. I practically just gave up because I was at it for over an hour. Then I did some of the things you told me to do and it just hit me so thanks again for your help!