Getting rid of fancy formatting:
use strict; $\ = $, = $; = ~ join ~ q º º, ~ ~ ~ reverse join q ¿ ¿, qw ~ rekcaH lreP rehtonA tsuJ ~; @; = join /\n/ , split map { ucfirst } split; ~ ~ ~ ~ print qq º Just Anothe\r Pe\rl Hacke\r º;
Changing the delimiters for the quotelike ops to more familiar characters:
use strict; $\ = $, = $; = ~ join ~ "\n", ~ ~ ~ reverse join ' ', qw(rekcaH lreP r +ehtonA tsuJ); @; = join /\n/ , split map { ucfirst } split; ~ ~ ~ ~ print "Just Anothe\r Pe\rl Hacke\r";
Precalculating the results from line 3:
$\ = $, = $; = ~ join ~ "\n", ~ ~ ~ reverse join ' ', qw(rekcaH lreP r +ehtonA tsuJ); $\ = $, = $; = ~ join ~ "\n", ~ ~ ~ reverse "rekcaH lreP rehtonA tsuJ" +; $\ = $, = $; = ~ join ~ "\n", ~ ~ ~ "Just Another Perl Hacker"; # join on a single value is a no-op $\ = $, = $; = ~ ~ ~ ~ "Just Another Perl Hacker"; # an even number of XOR is a no-op $\ = $, = $; = "Just Another Perl Hacker";
Putting it back in and removing the other no-op XORs:
use strict; $\ = $, = $; = "Just Another Perl Hacker"; @; = join /\n/ , split map { ucfirst } split; print "Just Anothe\r Pe\rl Hacke\r";
It's getting pretty obvious. @; is neither a special variable nor used anywhere so out with it. There's no interpolation so $, and $; can go too.
use strict; $\ = "Just Another Perl Hacker"; print "Just Anothe\r Pe\rl Hacke\r";
The \r at the end of the print string parameter makes the cursor go back to the beginning of the line, effectively letting the output record separator overwrite the already printed bits. There could be an empty string for the same effect.
use strict; $\ = "Just Another Perl Hacker"; print "";

Makeshifts last the longest.


In reply to Re: things are not what they seem (explained) by Aristotle
in thread things are not what they seem ( can you explain it to me ) by crazyinsomniac

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.