in reply to Re^2: Is there a way to open a memory file with binmode :raw?
in thread Is there a way to open a memory file with binmode :raw?

The problem is only with your expectations. Did you know that, in Unix, writing "\n" also becomes "\r\n", by default, just not in ordinary files. For example, it does that when writing to a TTY (having the default configuration).

Writing to a Perl scalar is not handled by the Windows clib, obviously. So there is no requirement that such writes emulate the default behavior of Windows' clib.

"\r\n" is the default text record separator for Windows text files.

- tye        

  • Comment on Re^3: Is there a way to open a memory file with binmode :raw? (\r, consistency)