frank hi wrote in post #1021069:
> Hi,
>
> I want to write the data into a file in binary mode. The file is opened
> in binary mode by ofile=File.open("filename",'wb').

All that does is turn off newline conversions, so if you write \n to a 
file, \n will be written to the file no matter what operating system the 
program is running on.

-- 
Posted via http://www.ruby-forum.com/.