From: dblack@... Date: 2006-07-09T02:26:03+09:00 Subject: Re: make this code more Rubyish On Sun, 9 Jul 2006, dblack@wobblini.net wrote: > Hi -- > > On Sat, 8 Jul 2006, William James wrote: > >> puts "Dir\tProd\tDev\tDiff", >> [ prod, dev ].map{|x| x.split(/\s+\S+\n/).map{|s| s.split} }. >> transpose.map{|x| x.transpose}.map{|n,s| >> [ s[0], n[0], n[1], n[1].to_i - n[0].to_i]}.select{|x| >> x[1,2]!=["0","0"]}.sort_by{|x| x[-1]}.map{|x| x.join("\t")}.reverse > > He's done it in Perl already -- he said more Rubyish :-) Whoops, my witty repartee was factually inaccurate. s/in Perl/in Ruby but in a more typically Perlish style/ :-) David -- "To fully realize the potential of Rails, it's crucial that you take the time to fully understand Ruby--and with "Ruby for Rails" David has provided just what you need to help you achieve that goal." -- DAVID HEINEMEIER HANSSON, in the foreword to RUBY FOR RAILS. Complete foreword & sample chapters at http://www.manning.com/black!