in reply to Writing a string of bits to a file, binary-style
Adrift in a *nix sea a lonely Win32 hacker shouts into the wind "On Win32 don't forget to use binmode."
cheers
tachyon