On Sep 17, 6:19 pm, William James <w_a_x_... / yahoo.com> 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