Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2023-02-03 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (24 votes). Check out past polls.

    Notices?