Hi --

On Wed, 11 Dec 2002 christopher.j.meisenzahl / citicorp.com wrote:

>
> Reading my nway through the pickaxe book. Saw this code on page 108:
>   aFile = File.new("data.dat")
>  aFile.each_byte {|ch| putc ch; putc ?.}
>
> I'm not following what this does, can anyone help me out?
>   putc ?.

The ? operator gives you the ASCII value of the character following
it.  So "putc ?." is like "putc 46", which outputs a '.' character.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav