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));
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.