From: Marcel Ward Date: 2006-11-04T03:08:21+09:00 Subject: Re: Unable to write to file... (example from "pickaxe book", On 03/11/06, Li Chen wrote: > Mike Fletcher wrote: > > John Maclean wrote: > > [snip] > > > > File.open( "infile", "r" ) | in | > > File.open( "outfile", "w" ) | out | > > while line = in.gets > > out.print line > > end > > end > > end > > Do you think this script work? It fails because "in" is a reserved word in Ruby and cannot be used as a variable name. Try changing the two instances of "in" to "inp" and it will work. -- Marcel