Topic: issues

I am trying to save a file to my file system, and I am trying to use something very simple just to test it out:

string = 'My String'
file ='test.txt')

only it doesn't work.  Instead, I am told that no such file or directory exists, which of course, I knew that already.  That's why I made the call to  Any suggestions?

Last edited by dsullivan (2011-02-11 15:35:32)

Re: issues"test.txt","w") {|f| f.write('MyString') }

Open the file, create it if it doesn't exist and open for writing "w"

The opened file descriptor is passed to the following block, where you write to it.  The file is closed when the block exits.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: issues

Worked like a charm.  Thanks!