J
Julian Leviston
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
Thanks,
Julian.
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
Thanks,
Julian.