Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Perl

(bottled version)

Date:05/17/05
Author:Christopher J. Carlson
URL:n/a
Comments:7
Info:n/a
Score: (3.01 in 292 votes)
# Copyright 2001 Christopher J. Carlson <cjc@dobbz.com>
# All Rights Reserved

         $a=
        "cpuu
       \bmft p
       \bg cff
       \bs";$b
       ="po ui
       \bf xbm
      \bm";$c="
      Ypv ublf p
     \bof epxo qb
   \btt ju bspvoe";
  $a =~ s/\n//;$a =~
  s/\s+/ /g; $b   =~
  s/\n// ;  $b    =~
  s/\s+/ /g;$c    =~
  s/\n// ;  $c    =~
  s/\s+/ /g;$a    =~
  y/b-z/a-z/;$b   =~
  tr/b-z/a-z/;$c  =~
  tr/b-z/a-z/ ; for(
  $d=100;$d>0;$d--){
  print"$d $a $b $d"
  ;print" $a,\n$c, "
  ;print($d-1);print
  " $a $b.\n";} $x =
  "cjc"; $y="dobbz";
  $z="com";print"\n"
  ;print "- $x\@$y."
   ;print"$z \n\n";

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
bottled by Acme::EyeDropsAndrew Savige06/04/0576
for signatureRandolph Chung, Joey Hess04/20/050
standard versionJim Menard04/20/052
Lingua::EN::InflectMarty Pauley04/20/051
minimal versionMark Sheppard06/01/051
object-oriented versionScott Bryce05/15/051
polyglotJeff Connelly04/20/050
BigIntAnonymous04/20/050

Comments

>>  Jonatan Andersson said on 05/22/05 13:05:19

Jonatan Andersson What label of beer is that?

>>  Brain said on 07/29/05 16:58:09

Brain This looks much better than the other bottled beer variant and has actually been done by hand and not by a module, kudos to the programmer :)

>>  Jon said on 08/13/05 13:18:20

Jon One big problem with this script is that this one says "1 bottles" while the other bottle one actually does it in proper english.

>>  Welpe said on 11/22/05 13:31:13

Welpe After all, this one shows only one bottle ;o)

>>  Fernando said on 04/16/07 09:53:01

Fernando I agree that this one is really cool but you can't discredit the author of the other version since he wrote the module as well!

kudos to both then!

>>  RiV said on 01/11/10 21:45:10

RiV \b doesn't work if you output to a file. Also, it counts down from 100.

>>  pdepmcp said on 07/08/10 16:32:48

pdepmcp It prints a simply but incorrect version of the song.
Previous notes are correct and I have to add the the last row in the countdown should not be "You take one down pass it around, 0 bottles of beer on the wall." but "Take one down and pass it around, no more bottles of beer on the wall.".

It misses the last two verses as well, but almost all versions I saw do that.

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: