Hi Liz, this is my attempt at decoding this clever JAPH, in fact my first attempt at decoding any JAPH, so please correct (and forgive) my analysis if wrong!

@; = (491036,8051555,4785250,3341086,912133,189089,691108);
# This is just an eye candy, an array placeholder of 7 elements
%; = qw/ He didn't,Just do to,Perl didn't understand,another it would,hacker! /;
# This constructs the %; hash variable with 4 entries, namely He, do, didn't, it:
He => didn't,Just do => do,perl didn't => understand,another it => would, hacker!
%: = qw/ ================================= ================================== Randal said it would be tough to do in sed. He didn't say he didn't understand sed. Randal understands sed quite well. Which is why he uses Perl. :-) -- Larry Wall in <7874@jpl-devvax.JPL.NASA.GOV> ================================= ================================== /;
This builds another hash lookup - %:
{ # required by redo, where to start for the redo /./ ? eval(join 't, ', qw:prin exi delphi:) : /./;
This is really (translated to):
/./ ? { print, exit, delphit, } : /./;
or just
/./ ? { print, exit, } : /./;
Clever, the first time this loop is enterred, $_ is undef, so the print and exit is not performed. delphit would have no effect (after the exit).
$:{do} = 'to';
# Another clever bit, insert the required 'do=>to' lookup pair into the hash table. How this is used will be explored later.
@; = map { join ',', '', $_, '' } values(%;);
Translates the values to the %; hash to ",xxx,", required by the lookup below
This translation is clever:
The key-value pairs in the %: hash so far
He => didn't didn't => understand do => to # manually inserted before it => would
And then... Modify the hash table %:, with values from the %; lookup.
eval '$:{q?'.$_.'?}=~s'.shift@; for keys(%;);
So that:
He => Just didn't => another do => Perl it => Hacker!
This next bit just creates the string to be printed. :-)
$_ = qq{@{[@:{qw{ He didn't do it }}]}};
The next bit goes back to the beginning of the loop, with $_ set to "Just another Perl hacker!", and of cause the print, exit, code will take over from there...
redo } x:

In reply to Re: Pe(a)rls in line noise by Roger
in thread Pe(a)rls in line noise by liz

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.