luma has asked for the wisdom of the Perl Monks concerning the following question:
not quite.
take a look at this script:
$testvar1 = "\x0A\x0D"; $testvar2 = "\x0A\x0D"; $testvar3 = "\x0A"; $testvar4 = "\x0D"; $testvar5 = "foo\x0Abar"; print("testvar1 = \"$testvar1\"\n"); print("testvar2 = \"$testvar2\"\n"); print("testvar3 = \"$testvar3\"\n"); print("testvar4 = \"$testvar4\"\n"); print("testvar5 = \"$testvar5\"\n");
dumping this out to a file and examing the resulting text in a hex editor, i get the following:
testvar1 = "\x0D\x0A\x0D"
testvar2 = "\x0D\x0A\x0D"
testvar3 = "\x0D\x0A"
testvar4 = "\x0D"
testvar5 = "foo\x0D\x0Abar"
the values inside the quotes have been expanded back in hex notation by myself, and the real cr/lf on the end of each line ommitted. what looks to be happening is that any time perl win32 sees a LF in a string, it automagically prepends a CR. needless to say, this behavior is fantasticly annoying and i'd really like to disable it somehow. any thoughts from the bretheren?
luma::s-video
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ActivePerl 5.6.1 Win32 munging CR/LFs
by aquacade (Scribe) on Jul 25, 2001 at 01:06 UTC | |
by tye (Sage) on Jul 25, 2001 at 01:45 UTC | |
|
Re: ActivePerl 5.6.1 Win32 munging CR/LFs
by wine (Scribe) on Jul 24, 2001 at 22:41 UTC | |
by luma (Novice) on Jul 24, 2001 at 22:57 UTC | |
|
Re: ActivePerl 5.6.1 Win32 munging CR/LFs
by aquacade (Scribe) on Jul 25, 2001 at 05:07 UTC | |
by Hofmator (Curate) on Jul 25, 2001 at 14:53 UTC |