From: "Hal E. Fulton" Date: 2003-07-11T06:42:35+09:00 Subject: Re: Ruby T-Shirt Idea ----- Original Message ----- From: "Xavier Noria" To: "ruby-talk ML" Sent: Thursday, July 10, 2003 4:35 PM Subject: Re: Ruby T-Shirt Idea > On Thursday 10 July 2003 22:32, Orion Hunter wrote: > > > What we need is a code snippet that is excessively long and obfuscate > > in Perl, such as a single line of code which has to wrap around the > > t-shirt to be completed (with all the @ and $ symbols, etc.), and > > then do the same in Ruby underneath... which only takes a fraction of > > the width of the front side of the shirt. > > IMHO it will be almost impossible to do that, being fair and idiomatic > with the Perl version, writing readable Perl, and getting that ratio at > the same time. > > Though I would be glad if I was proved wrong :-). I have little knowledge of Perl. Suppose you wanted to iterate through an array and print out the odd-numbered elements: array.each_with_index {|x,i| puts x if i % 2 == 1 } How would that look in Perl? Hal -- Hal Fulton hal9000@hypermetrics.com