From: "Simon Kröger" Date: 2006-06-26T18:58:39+09:00 Subject: Re: Some ugly code (again) arnaud stageman wrote: >> If you want something one liner, >> >> (['rake']*(x*y)).zip((1..x).to_a*y,(1..y).to_a*x).each{|z|puts "#{z}"} >> >> Or >> >> ((1..x).to_a*y).zip((1..y).to_a*x).each{|z|puts "rake#{z}"} >> >> >> Regards, >> >> Park Heesob > > Beuh it's remained me Perl :-) > > Thanks for your response Park. > and another one liner: puts (0...x*y).map{|i| "#{name}#{i%x+1}#{i/x+1}"} cheers Simon