Did you forget to set your filehandle to binmode?
In reply to Re: Windows and UNIX end of line characters by Anonymous Monk in thread Windows and UNIX end of line characters by merrymonk