in reply to How the perl converts LF into CRLF

How are you sending the file? Some mechanisms (like ASCII FTP transfers) translate line-ends automatically.

Anyway, check out binmode and the open pragma