From: Hal Fulton Date: 2005-10-13T11:47:43+09:00 Subject: Re: A (minor) coding challenge William James wrote: > > [snip solution] That does indeed work. FWIW, here is my unfinished one below. Hal lines1 = File.readlines("f1") lines2 = File.readlines("f2") def show(l1,l2) l1.each_with_index do |x,i| printf "%-38s | %-38s\n", x, l2[i] end end N = 15 def canonize(lines) arr = [0] lines.each do |line| if line=="\n" if arr[-1].is_a?(Fixnum) arr[-1]+=1 else arr << 1 end else # it's part of a paragraph if arr[-1].is_a?(Array) arr[-1]<