From: Ezra Zygmuntowicz Date: 2005-06-18T10:59:34+09:00 Subject: Re: newby question Since it looks like you are trying to output an html file maybe replace the "\n" with "
" or surround the entire block of test in
 tags might work?
On Jun 17, 2005, at 6:50 PM, Charles L. Snyder wrote:

> How do I get each key (they are words /strings) to output on a new  
> line in
> this example?
>
> File::open(title + '.htm', 'w') do |f|
> hash.keys.each {|s|  f.puts s}
> ......other stuff
> end
>
> -this results in all keys on one line
>
> I've tried:
> dict.keys.each {|s| f.puts s "\n"}
> dict.keys.each {|s| f.puts s"\n"}
> dict.keys.each {|s| f.puts ("#{s} \n"}
> dict.keys.each {|s| f.puts s + " \n"}
> dict.keys.each {|s| f.puts s + '\n'}
> dict.keys.each {|s| f.puts s + \n}
> etc ad nauseum
>
> Sorry for asking such a simplistic question....
>
> CLS
>
>
>

-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732