Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
...my first attempt at decoding any JAPH...

Well, you're in good company then, because this was the first JAPH I ever made myself. Honest!

@; = (491036,8051555,4785250,3341086,912133,189089,691108);
Yep, that's just eye candy. There have been some JAPH's recently that used magical increment for an X number of times, and I was going for similarly looking numbers. The:
================================= ==================================
and at the end: x: are also just eye candy. I tried several Larry Wall quotes while building this japh, and the line with '=====' made it possible for me to easily switch between keys and value in the hash (change the space between the "==="'s to "=" and all keys are values and vice versa in the hash).

$:{do} = 'to';
was actually a kludge. Originally I had the "to do" exchanged in the quote. But I found the error in the quote too obvious.

eval '$:{q?'.$_.'?}=~s'.shift@; for keys(%;);
This actually works because whatever order hash keys have in a hash, the order returned by the "keys()" and "values()" functions is the same. And for some reason, I _had_ to put parentheses with keys() and values() because otherwise I was getting the warning that the call was ambiguous. That's still on my list to check out later.

$_ = qq{@{[@:{qw{ He didn't do it }}]}};
is what you call an interpolated anonymous hash slice ;-) Working from the outside in: the qq{...} creates an interpolated string, which will put spaces between the elements because $" was not changed. The @{...} dereferences an array reference. The [...] create a reference to an array. The @:{...} creates a hash slice on %:. And finally the qw{...} creates the array of keys for the hash slice.

...cause the print, exit, code will take over from there...

I don't know if that is what you meant to say, but after the "exit" there is no code to execute anymore. So the "x:" is never reached, it's just eye candy.

Liz


In reply to Re: Re: Pe(a)rls in line noise by liz
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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (10)
    As of 2014-10-21 19:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (108 votes), past polls