Robert Klemme wrote: > I would do > > $stdin.each do |line| > line.chomp! > puts "I got #{line} !!" > end > > because that is the more Ruby typical idiom for iterating all lines. Use #each_line if you want to do that. Ruby 1.9 removed #each from Strings, but strangely decided to leave it on Files. To be safe, don't assume that 'each' means 'each line'. -- Posted via http://www.ruby-forum.com/.