Thanks! The light shines. So how can i -write- to a file using the code below as an example?

On Thu, 19 Jan 2006 19:56:55 +0900
zdennis <zdennis / mktec.com> wrote:

> John Maclean wrote:
> > Following the example from "pickaxe book", second edition, p128
> > 
> > #!/usr/bin/ruby 
> > File.open("testfile", "r") do |file|
> >   while line = file.gets
> >     puts line
> >   end
> > end
> > 
> > produces
> > copy.rb:2:in `initialize': No such file or directory - testfile (Errno::ENOENT)
> >         from copy.rb:2
> > 
> 
> John, you need the file named "testfile" to exist before you can run that code. It can't open a file 
> if it doesn't exist!
> 
> Zach
> 
> 
> 


-- 
John Maclean
MSc (DIC)
07739 171 531