From: Mark Sparshatt Date: 2004-07-22T05:00:54+09:00 Subject: Re: tempfile iterator? tony summerfelt wrote: >On Thu, 22 Jul 2004 04:12:04 +0900, you wrote: > > > >>open('file','a+'){|f| f.write t.read} >> >> > >i have a file '@lg' the file already exists, so i used: > >tlf.open > >open('@lg','a') {|f| f.write tlf.read} > >but the contents of the temprorary file created as tlf were not >appended to the filename in '@lg' > > > if @lg is a variable holding the filename then that should be open(@lg, 'a') {|f| f.write tlf.read} The code you wrote would be trying to append to a file called '@lg' -- Mark Sparshatt