in reply to Woes with binmode

What do you mean by "binary"? Every ASCII file is also a binary file, but not the other ways round.

So what exactly should the transformation do?