in reply to String differs from printing to STDOUT and printing to file

As you are appending, perhaps the file originally terminates with a solo carriage return? Hexdump the file to see for sure. Alternatively, try with an overwrite instead of an append to see if the problem still exists.

  • Comment on Re: String differs from printing to STDOUT and printing to file

Replies are listed 'Best First'.
Re^2: String differs from printing to STDOUT and printing to file
by cboesch (Initiate) on Oct 23, 2019 at 10:35 UTC
    With an overwrite it's the same!
    Thanks, Christian