Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

99 Bottles of Beer take two

by Dylan (Monk)
on Dec 23, 2003 at 23:02 UTC ( #316737=obfuscated: print w/ replies, xml ) Need Help??

The following code runs under strict and warnings, and prints "99 bottles of beer on the wall", etc. It's slow at first, but employs a caching system... It is a (better|worse) version of an earlier obfu of mine...
#/usr/bin/perl $a=100;XK:(--$a>1)&&($::m=($::m||sub {p($a,pack('c*', 0x62,0x6F,0x74,0x74,0x6C,0x65,0x73),w(0x18B),w(0x9717) ,w(0x193),w(0x35A4),w(0x62EFF),chr(0x2C));sub l{eval w(11292).w(383).q{(pack("c",0xA))}};p($a,pack('c*',0x62, 0x6F,0x74,0x74,0x6C,0x65,0x73),w(0x18B),w(0x9717),chr( 0x2C));p((w(0x560E6)),w(0x290C),w(0x13C9F).chr(0x2C),w (0x44F24),w(0xFD),join('',w(0x486),w(0x38E3)),chr(0x2C)) ;sub p {eval w(11292).w(383).q{(join(pack("c",0x20), "\u$_[0]",@_[1..($#_-1)]).$_[-1].pack("c",0xA))}};p($a -1,($a-1)==1?chr(0x62).chr(0x6F).chr(0x74).chr(0x74).chr (0x6C).chr(0x65):pack('c*',0x62,0x6F,0x74,0x74,0x6C,0x65, 0x73),w(0x18B),w(0x9717),w(0x193),w(0x35A4),w(0x62EFF),chr (0x2E));eval w(11292).w(383).q{(pack("c",0xA))};goto XK;}) )->();%::qw=qw::;sub w {($::qw{$_[0]})&&(return$::qw{$_[0] });$b=$_[0];$_=chr(97);{if($b-->0){$_++;redo;}};$::qw{$_[ 0]}=$_;}p(1,chr(0x62).chr(0x6F).chr(0x74).chr(0x74).chr( 0x6C).chr(0x65),w(0x18B),w(0x9717),w(0x193),w(0x35A4),w( 0x62EFF),chr(0x2C));p(1,chr(0x62).chr(0x6F).chr(0x74).chr( 0x74).chr(0x6C).chr(0x65),w(0x18B),w(0x9717),chr(0x2C));p(( w(0x560E6)),w(0x290C),w(0x13C9F).chr(0x2C),w(0x44F24),w(0xFD) ,join('',w(0x486),w(0x38E3)),chr(0x2C));p((w(0x17A)),w( 0x3A5FC),pack('c*',0x62,0x6F,0x74,0x74,0x6C,0x65,0x73),w( 0x18B),w(0x9717),w(0x193),w(0x35A4),w(0x62EFF),chr(0x2E));

Comment on 99 Bottles of Beer take two
Download Code
Re: 99 Bottles of Beer take two
by NetWallah (Abbot) on Dec 24, 2003 at 18:40 UTC
    It runs in under 2 seconds on my Win XP 700 Mhz machine, which is plenty fast (++).

    Now -- would'nt it be nice if it could use a text-to-speech engine, and actually RECITE the verse ?

    "When you are faced with a dilemma, might as well make dilemmanade. "

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://316737]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-07-31 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (253 votes), past polls