From: Chris Shea Date: 2007-02-12T03:00:09+09:00 Subject: Re: One-Liners (#113) I wasn't able to get down to less than 80 chars on two of the items. For commaizing numbers and getting a random line from a file (assuming loading the whole file into memory is against the rules) I think I was just barking up the wrong path. I like my nested hash solution (which I wrote in both golf and non-golf modes. # Commaize (works for both floats and integers) a=quiz.to_s.split('.');a[0].reverse.gsub(/ (\d{3})/,'\1,').chomp(',').reverse+"#{'.'+a[1] if a[1]}" # Flatten once a=[];quiz.each{|i| if i.is_a? Array;i.each{|j| a<1;if b%2==1;b=3*b+1;else;b=b/2;end;a<a}};a hash = quiz.pop; quiz.reverse_each { |item| hash = { item => hash } }; hash Thanks for the good time.