Reading a file Part I
content = "" File.open("foo.txt") do |file| while line = file.gets content += line end end puts "Here are the contents of the file: " + content
content = "" File.open("foo.txt") do |file| while line = file.gets content += line end end puts "Here are the contents of the file: " + content