Boy, do I hate when people change their posts without specifying what the update is ... wasn't your original post "use binmode"? Nothing more nothing less? Why did you change it?
Update: If you didn't change it,
Itatsumaki's comment would actually make sense ...