in reply to How to inject chr(10) chr(13) into a string

You would either want to use binmode on the file being modified, or use \x0A\x0D instead of \r\n, since \n on a windows machine is automagically translated to a carriage-return line-feed.

__________
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.
- Terry Pratchett