From: Barry Sperling Date: 2004-08-28T04:20:20+09:00 Subject: Re: Question about ? operator for ASCII Thanks Austin, Mikael and Edgardo! That's what I was looking for. And I can use the .chr to reverse the process, so that was useful, too! Barry Austin Ziegler wrote: > On Sat, 28 Aug 2004 01:59:05 +0900, Barry Sperling wrote: > >>Hello, >> I am a nuby and I couldn't find how to get the ASCII value of a >>character in a variable. I looked in the Pragmatic Programmer and did this: >> >>s = "ABC DE." >>s.scan( /./ ) do |a| >> puts ?a >>end > > > s.each_byte do |a| > puts a > end >