develooper Front page | perl.fwp | Postings from May 2003

99 bottles of beer on the wall

From:
Zed Lopez
Date:
May 23, 2003 13:30
Subject:
99 bottles of beer on the wall
Message ID:
20030523203004.GD23497@kamidake.apricot.com
OK, here's some pure frivolousness.

http://99-bottles-of-beer.ls-la.net/ has hundreds of examples of
programs to output 99 bottles of beer on the wall, including several
in Perl under:

http://99-bottles-of-beer.ls-la.net/p.html

What's your lowest golf score to solve it?

The output begins:

99 bottles of beer on the wall,
99 bottles of beer,
Take one down, pass it around,
98 bottles of beer on the wall.
98 bottles of beer on the wall,
98 bottles of beer,
Take one down, pass it around,
97 bottles of beer on the wall.

and ends:

2 bottles of beer on the wall,
2 bottles of beer,
Take one down, pass it around,
1 bottle of beer on the wall.
1 bottle of beer on the wall,
1 bottle of beer,
Take one down, pass it around,
0 bottles of beer on the wall.

and has the obvious 95 4-line stanzas in between.  Note that "bottle"
becomes correctly singular in the "1 bottle" case.  (The 'minimal'
solution on the website above doesn't do this.)

I've got 144 strokes (but I'm a novice golfer and eagerly await seeing
some brilliant 80 stroke solution.)

-- 
zed at-sign apricot dot com                      http://www.MemeMachineGo.com/
Zed Lopez PO Box 12546 Berkeley CA 94712




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About