From: "Erik Bågfors" Date: 2001-07-22T00:53:20+09:00 Subject: [ruby-talk:18258] Re: 99 bottles of beer On 21 Jul 2001 08:27:46 +0900, Glen Starchman wrote: > 99.downto(0){|x|w=" on the wall";u="#{x!=0?eval(x.to_s):'no more'} > #{x>1?'bottles':'bottle'} of beer";p"#{u}#{w} #{u}. Take one down, pass > it around,#{u}#{w}"} > > > 159 characters... can it be squeezed down any further? Yes, You don't need the eval and you say both "bottle" and "bottles". You can also save a few characters by using + instead of #{x} and so on. 99.downto(0){|x|w=" on the wall";u=" #{x>0?(x):'no more'} bottle#{x!=1?'s':''} of beer";p u+w+u+". Take one down, pass it around,"+u+w} 137 characters. /Erik -- Erik B�gfors | http://erik.bagfors.nu/ erik@bagfors.nu | Erik.Bagfors@ardendo.se Supporter of free software | GSM +46 733 279 273 fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32