From: Jim Freeze Date: 2005-09-13T07:50:41+09:00 Subject: Re: Adventures in html decoding. On 9/12/05, Morgan wrote: > === > require 'cgi' > outfile = File.new(ARGV[1], File::CREAT|File::WRONLY|File::EXCL) > IO.readlines(ARGV[0]).each{ |line| > outfile.puts CGI::unescapeHTML(line) > } > outfile.close > === This may be off topic, but I always wonder why all the flags to File. Could what you are doing be written as: File.open(ARGV[1], "w") { |outfile| File.foreach(ARGV[0]) { |line| outfile.puts CGI::unescapeHTML(line) } } or am I missing something big here? -- Jim Freeze