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

(BigInt)

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:0
Info:n/a
Score: (3.00 in 29 votes)
#!/usr/bin/perl -w

use Math::String 1.16;
use Math::BigInt 1.48;

my $i = Math::String->new('99',['0'..'9']);             # counter
my $cs = ["a".."z","A".."Z"," ",",","(",")","\n"];      # charset
my $c = 'Math::String';                                 # class
my $u = $c->from_number(                                # b. of beer on wall
       "143457256751672444408485136195337476997885002593618110354",$cs);
my $v = $c->from_number(                                # take one, pass it
       "2183742159727155773060245326632596445683097582725669500",$cs);
my $w = $c->from_number(                                # bottles of beer
       "121961920301233380909600391518980493",$cs); 

while ($i ne '00') { print "$i$u$i$w$v"; $i--; print "$i$u\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
bottled versionChristopher J. Carlson05/17/057
Lingua::EN::InflectMarty Pauley04/20/051
minimal versionMark Sheppard06/01/051
object-oriented versionScott Bryce05/15/051
polyglotJeff Connelly04/20/050

Comments

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: