On 8 Oct 2008, at 17:29, Darrell Fuhriman wrote:
You *remove* all \r\n, replacing it with nothing
Yes, which is what I wanted. What I didn't want is to remove all
solitary \n, which is what it did.
If I were to have used s/af//, I would not expect it to convert
'wtf' to 'w', but that's the equivalent of what it did.
Seems to me to work fine:
$ hexdump -C data
00000000 6c 69 6e 65 0d 0a 61 6e 6f 74 68 65 72 0a 74 68 |
line..another.th|
00000010 69 72 64 0d 0a 66 6f 75 72 74 68 0a |
ird..fourth.|
0000001c
$ perl -i.bak -ne 's/\r\n//;print' data
$ hexdump -C data
00000000 6c 69 6e 65 61 6e 6f 74 68 65 72 0a 74 68 69 72 |
lineanother.thir|
00000010 64 66 6f 75 72 74 68 0a |dfourth.|
00000018
Is that different from what you observed? If so which version of Perl
are you using?
--
Andy Armstrong, Hexten