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

(polyglot)

Date:04/20/05
Author:Jeff Connelly
URL:n/a
Comments:0
Info:n/a
Score: (3.00 in 41 votes)
' "99 Bottles of Beer on the Wall" QBasic / Perl Polyglot            '.
' Copyright (C) 2000 Jeff Connelly <polyglotqbperl@xyzzy.cjb.net>    '.
' May be freely distributed                                          '.
'                                                                    '.

' Probably only works in DOS.  You can get QBasic 1.1 with DOS, or   '.
' on the World Wide Web at http://www.neozones.com/ .                '.
' Note that QBasic reformats source code as it is opened; so do not  '.
' save this file inside QBasic if you want it to be parsed by Perl.  ';

'';sub function{}sub st{}
function st$(x1, y!, m$)
st$ = ltrim$(str$(y!))
end function
'!;

m%=99'%;$STATIC=9x2;
do
'NUL'; do {
    print st$(x1,m%-0%,z.$); '',print"\cH"x3;print
    '',$STATIC;
    print " bottles of beer on the wall";
    print ''; print "\n"x2; <<;
    print


    print st$(x1,m%-0%,z.$); '',print"\cH"x3;print
    '',$STATIC; 
    print " bottles of beer on the wall,";
    print ''; print "\n";

    print st$(x1,m%-0%,z.$); '',print"\cH"x3;print
    '',$STATIC;
    print " bottles of beer,";
    print '' and print "\n";


    print "Take one down, pass it around,";
    print ""; ''; print "\n";
    ''; <<;
    print


    ''; --$STATIC;
    m%=m%-1+foo.


''}  until $STATIC == 0 or !<<;;
loop until m%=0'%-1

system

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
bottled by Acme::EyeDropsAndrew Savige06/04/0576
minimal versionMark Sheppard06/01/051
bottled versionChristopher J. Carlson05/17/057
Lingua::EN::InflectMarty Pauley04/20/051
for signatureRandolph Chung, Joey Hess04/20/050
standard versionJim Menard04/20/052
object-oriented versionScott Bryce05/15/051
BigIntAnonymous04/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: