Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Golf: Back to those damn beer bottles again...

by cLive ;-) (Prior)
on Mar 17, 2003 at 23:07 UTC ( #243836=note: print w/replies, xml ) Need Help??

in reply to Re: Golf: Back to those damn beer bottles again...
in thread Golf: Back to those damn beer bottles again...

You obviously didn't look too closely at my attempt! Shaved another 3 bytes of by predeclaring the sub before use, making the & optional: and shaved a space after the warn...

And if we cheat with the 'and' and the 'one' :), we get down to 149 ;-)

sub b{$s=$n-1?'s':'';($n||'No')." bottle$s of beer"}$n=99;warn$b=b,$w= +" on the wall",", $b,\nTake 1 down & pass it around,\n".b(--$n)."$w.\ +n"while$n;
cLive ;-)

Replies are listed 'Best First'.
Re: Re: Golf: Back to those damn beer bottles again...
by benn (Vicar) on Mar 18, 2003 at 01:18 UTC
    lol - no - I got so wrapped up in everybody elses attempts in the previously-referenced nodes that I missed the fact I'd written a virtual dupe of yours (other than the plural handling) :) I reckon you should replace the '1' and '&' cheats and declare yourself a winner with 153...though there's still something smelly about the bottle(s) - I'm convinced there's shaving to be done there somewhere...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://243836]
[LanX]: healthy intelligent kids!
LanX when they reach my age they'll eat them sorted

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-12-16 16:17 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (457 votes). Check out past polls.