n=0 File.open('text.txt', 'r') do |f1| while line = f1.gets text=line end n=0 text2=Array.new(text.length) while n