in reply to Is there a way to open a memory file with binmode :raw?

Are you on MSWin? When writing to the file, you didn't change the binmode, so you're writing with :crlf. Line 26 should be
binmode $fh, ':raw';
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Is there a way to open a memory file with binmode :raw?
by stevieb (Canon) on Oct 09, 2015 at 21:05 UTC

    Thanks choroba.

    Yes, I'm on MSWin for this test, and I want both CRLF to be written to the file, and then displayed after the fact. This does as expected with the actual file, but not the scalar ref memory pseudo file.

      Sorry, I'm on Linux now. So do it the other way round: when printing to the scalar ref, set the binmode to :crlf.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        That definitely works, but why isn't it doing that by default while on a win32 system?