In light of BooK's semi-challenge in the chatterbox, I give you an obfuscation that evals eight levels deep. Have fun!
#!/usr/bin/perl use constant LEVELS => 8; $\ = "\n"; $_ = ('eval ' x LEVELS) . '\'e()\''; print eval; sub e() { <<'Z'; my ($qw, $my) = qw(my qw); my (%sub); $sub{a} = sub { "\$; = join \$,, map { \"\\\$\$_,\" } (\'$_[0]\'..\'$_[1]\');" }; $sub{b} = sub { "\$z{$_[0]} = \"\$qw (\$;) =\";" }; $sub{c} = sub { "\$; = join \' \', $my/$_[0]/;" }; $sub{d} = sub { "\$z{$_[0]} = \"\$$qw (\$;) ;\";" }; $sub{e} = sub { "\$z{$_[0]} .= (join \"\\\$\", ($_[1]));" }; $sub{f} = sub { "\$z{$_[0]} .= \"$_[1]\";" }; join ";\n", "$qw (\$$my, \$$qw) = $my($qw $my);", "$qw %z;", "local \$ +;;", $sub{a}->('a', 'm'), $sub{b}->('1'), $sub{a}->('n', 'z'), $sub{b}->('3 +'), $sub{c}->('e s i t v l r $ _ [ ] 0 .'), $sub{d}->('2'), $sub{c}->('; - > \' , " \' { } ( ) u b'), $sub{d}->('4'), '$z{5} = "<<E;"; $z{6} = \'\';', $sub{e}->(6, 'undef, qw|w b y z u s h i j l k|'), $sub{f}->(6, "\\\\\\\\\\\\\\\'\\\\\\\$\_\[1\]\\\\\\\$\\\_\\\$\\\{j\}2" +), $sub{e}->(6, 'undef, \'k\', \'h\', \'i\', undef'), $sub{f}->(6, "\\\{j\\\}1"), $sub{e}->(6, 'undef, \'k\', \'s\', \'m\'') +, '$z{6} .= "(rev"', $sub{e}->(6, 'undef, \'a\', \'g\', qw/b a h/'), $sub{f}->(6, "\\\\\\\_\\\[\\\$l\\\]"), '$z{7} = \'\'', $sub{e}->(7, 'undef, qw:x m:'), $sub{f}->(7, "\\\\\\\"\\\\\\\\\\\\\\\'\\\$n\\\\\\\"\\\\\\\}\\\\\\\)\\\ +$o\\\$p(\\\$q\\\$\\\{b\\\}calar "), $sub{e}->(7, 'undef, \'g\', undef'), $sub{f}->(7, '{a}verse '), $sub{e}->(7, 'undef, qw/t r t n s q r/, undef'), $sub{f}->(7, '{t} sca +lar \$'), '$z{8} = \'\';', $sub{f}->(8,'{f}oca'), $sub{e}->(8, 'undef, qw/f d/, +undef'), $sub{f}->(8, "\{c\}m\\\$a\\\\\\\'\);"), '$z{9} = \'E\';', "join \"\\n\", map { \$z\{\$\_\} \} (1..9);"; Z }

In reply to Meta ** 8 by premchai21

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.