in reply to Comparing two text files

Your comparision is in SCALAR context. So it would always compare only the number of elements in the Two arrays. So it's better to do it on line at a time.

$index = 0; while($raw_data_Actual[$index] ne "" or $raw_data_Expected[$index] ne +""){ if($raw_data_Actual[$index] ne $raw_data_Expected[$index]){ print"Fail: $raw_data_Expected[$index]"; last; $index++; }


This just one of the solution. There is always more than one way to solve a problem.