in reply to Comparing two text files

The problem is in (@raw_data_Actual == @raw_data_Expected).

You compare in scalar context, 1==1 so always true.

Changing the line to ("@raw_data_Actual" eq "@raw_data_Expected") should work.

Frankly speaking I dont like this solution one bit. There are better solutions possible. I think you posted this question before (if I recall correctly) and some solutions were suggested to you!