From: Daniel Lucraft Date: 2007-09-12T20:40:29+09:00 Subject: Re: what is this syntax: \001\002 ? 7stud -- wrote: > Hi, > > On p. 131-132 in "Programming Ruby 2d.", it talks about writing binary > data to files, but there's no explanation of the syntax: > > str1 = "\001\002\003" > This is an octal escape sequence. Use it to insert an arbitrary byte into a string. The escape code is \n, \nn or \nnn where each n is from 0 to 7. In octal 000 is 0 and 777 is 255. best, Dan -- Posted via http://www.ruby-forum.com/.