From: 7stud -- Date: 2009-07-22T15:03:34+09:00 Subject: Re: Trouble Counting Words, Sentences and Paragraphs Try this: require 'pp' lines = File.readlines("text.txt") pp lines puts "----" text = lines.join paragraph_count = text.split(/\n\n/).length puts "#{paragraph_count} paragraphs." What do you see? -- Posted via http://www.ruby-forum.com/.