Thanks again for that , make sense.
Posting the final version of program here, in case its of some use to other people.
-- CUT HERE, save as 'convert.rb' --
# Simple Ruby script to convert text-format ebooks from Project Gutenberg
# To a format which is more readable on an Amazon Kindle.
#
# Run with 'ruby -an convert.rb <original.txt> > <new.txt>'
#
# links:
http://www.gutenberg.org,
http://www.ruby-lang.org
#
BEGIN { BLANKLINE=sprintf("\r\n"); }
if $_ == BLANKLINE then
printf("\n\t"); next;
else
chomp!
printf(" %s",$_);
end
-- CUT HERE --