From: Mike Harris Date: 2006-09-29T00:41:47+09:00 Subject: Re: Files? Jonathan Denni wrote: >I'm getting quite lost and discouraged trying to learn Ruby. [I have no >programming experiance, just html and css] > >for something to start with, I would like to use ruby to create a file >in directory G:\Ruby named "myFile.html" > >that seems simple enough, but I can't figure out how to do it [and >http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_io.html isn't >helping] > >thanks :) > > > File.open("g:/Ruby/myFile.html",File::WRONLY|File::CREAT) do |f| f << "" f << " f << "Hello World" f << "" f << "" end ?