From: ruby talk Date: 2004-11-23T13:22:56+09:00 Subject: Re: binary reading hmm... i really wanted the binary. is there a to_b? On Tue, 23 Nov 2004 13:11:50 +0900, Zach Dennis wrote: > ruby talk wrote: > > > > > a=File.open("c:\\1.txt") > > a.binmode > > print a.read(1) > > > > it prints the char. how can i get and play with the bits and bytes of the file? > > a=File.open("c:\\1.txt") > a.each_byte{ |byte| > #play with each character/byte here > } > > > Zach > >