From: Alex Shulgin Date: 2007-09-18T03:05:04+09:00 Subject: Re: Newbie: what's Ruby idiom for word-by-word input? On Sep 17, 6:19 pm, William James wrote: > > Awk is a very popular tool for text processing, but there is no > way to make it treat a sequence of whitespace characters as a > record-separator. So in awk, as in Ruby, text is almost always > read a line at a time. I thought Ruby is not just a text processing tool, but a general purpose programming language. Anyway, it would be nice to have a solution for this problem as compact and flexible as C++ example I've provided. What if scanf() didn't discard the rest of the line... but now is too late to fix it. :-/ Regards, Alex