http://qs321.pair.com?node_id=527184


in reply to Conversion of unix LF to DOS LF issues

I seem to remember using binmode on the filehandles in a situation like yours; that may do what you want without your having to do any line ending translation explicitly. That only is important on non-Unix systems as I recall.