in reply to output to a single line
So that you know where your extra \n character is. I guess that if you see the expression on two lines, it should be in $var1, but you should try and see where the expression is broken.print file "'$var1'=='$var2'\n";
In any case, you'd better be aware that when you read a text file, you also read its embedded \n's, so you'd better chomp the lines before processing them.
|
|---|