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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Emboldened by my deciphering results of yesterday (and inspired by this), I decided to create the first (AFAIK) palindromic JAPH. Though the algorithm isn't terribly obfuscated, I took a harder route by not including any comments in the code, because otherwise you could do something like
print "Just another Perl hacker,\n"; # ;"n/,rekcah lreP rehtona tsuJ" tnirp
So everything you see here is parseable by perl (although, as the saying goes, I'm not quite sure why it is).

Each line is character-reversed, with the exception of parentheses and braces (which are balanced), and the slash chars "/" and "\", which are exchanged for their counterparts, because it just looks better.

$_='=_$ JustsuJ anotherehtona PerlreP hacker,rekcah ;'; @ tilps=split ; ;shift@tilps;split@tfihs; ;split@pop;pop@tilps; ;s{^(.+)(.)(.)\2.+$}{$1$2$3}s||1for@tilps;split@rof1||s{3$2$1$}{$+.2/( +.)(.)(+.)^}s; print$_.$",for@tilps;print$/ ; \$tnirp;split@rof,"$._$tnir +p ;";

In reply to by jima

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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2022-12-07 10:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found