This is not normal behaviour and where we will need to see some code to understand what is happening. Altering the value of the input record separator, $/, in the manner described has no effect on the substance of the data read into the scalar variable.