Learning Ruby

Reading a file Part II


content = File.read("foo.txt")

puts "Here are the contents of the file: " + content

What could be simpler than that!

 

 

January 13, 2010 at 11:04 am