From: James Edward Gray II Date: 2005-08-18T00:32:26+09:00 Subject: Re: Is there a simpler way to do this? On Aug 17, 2005, at 10:30 AM, Julian Leviston wrote: > Hi. > > Just wondering if there's a simpler way to do this? > > file = File.open("/usr/blah/1.txt") do | file | > while line = file.gets > the_string += line > end > end > > In other words, open a file, read the contents into a string called > the_string file_contents = File.read("/usr/blah/1.txt") James Edward Gray II