Mega Code Archive

 
Categories / Ruby / File Directory
 

You can also read an entire file into an array, split by lines

puts File.open("text.txt").readlines.join("--")