It seems like writing obfus is an important step on one's way to become a perl monk. So be it, on my quest to educate everyone about the importance of using strict I present you my first (deliberately) obfuscated code.

Update: added READMORE tag -- the code looks even more ugly when wrapped at less than 73 columns. Can't let that happen at The Monastery Gates, right? ;-)

#!/usr/bin/perl -w # always use strict; # or die $/ =' Ju ac an Ju st ck er ha ck her %p erl % hac ker % Just %an ot her %pe rl%h t% an o the r% pe r l%h ac ke r%Ju st %a no th ck er % J u s t % an other%p er l % ha Ju st %a n ot he r% p er l%h ac ke r% Ju Ju st %an o t her %p er l% ha c ke ck er %Jus t% a noth er %p er l% ha Ju st %anot he r %perl %h ac ke r% Ju ac ke r%Jus t%anothe r%per l% ha ck er %J Ju st %anothe r%per l% ha ck er %J th er %perl %ha ck er %J us t% an ot he r% pe rl %h ac ke r% Ju st %a no th e r% pe rl %h ac ke r %J us t%a no t h er % pe r l% ha c ke + r r%Just%another %perl %hacker %Ju st%a noth er%pe rl +% J ust%a no t he r% p erl% hack e r +'; $,='($\=$/)=~s,.*\n([^\n]+)\n[^\n]+$,$1,gsx;$\ +=~ y$ $$d;$\=@@($\,@($\,"J"),@($\,"J",1+@($\,"J"))-@($\,"J"))x +3; $,=@@@"", @@@@@ { y, ,,d; @@@@(@($\,$_)+@($\,"n")*@($\,"%") *@($\,"%"))}@@@@@@ m.\S.,split"\n",$/;$,=~s a`a$_a for split"","US.I\'TL!";$,=~s.[A-Z]. $&.g;$\=""; print"","\n";';$.="@"x6; $,=~s, $.,$.=~s$@$$;$_,egx for qw,grep map chr join substr index,; eval $, ;


-mk

In reply to JAPH? by marcink

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.