Deconstruction a speciality. Rather than explain extensively I have gone for the plain perl recoding approach to make it blindingly obvious how this works. I like this JAPH. cheers tachyon #!/usr/bin/perl -w use strict; # this string identifies the key encoding features basically the # length, but also the . and , The ) is meaningless other than # not meaning something! The final full stop does nix. $_="xxxx xxxxxxxxxx xxxxxxx xxxxx xxxxxxx xxx xxxxxxx xxxx xx, xxxxxx x xxxxxx xxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxx xxxxxxx xxxx xxxxxx xxxxxxxx xxxxxx xxxxx xxxxxxx xx xx. xxxxx, xxxxxx xxxxx xxxxxxx xx xxxxxx xxxxxxxxxxxx xx. xxxxxx xxxxxxxx xxxxxx x) xxxxxx xxx xxxxxx xxxxxxxxxxx xxxxxx xxxxx xxxxxxx xx."; # this loop replaces the map for (m/x+|[\.,]/g) { push @a, eval'(/[\.,]/) ? 0 : length $_'; } # net result of map step is: # @a = qw(4 10 7 5 7 3 7 4 2 0 6 1 6 14 6 15 7 4 6 8 6 5 7 2 2 0 5 0 6 + 5 7 2 6 12 2 0 6 8 6 1 6 3 6 11 6 5 7 2 0); # this breaks down the second line into self evident steps while ($foo = shift @a) { $hex_code1 = sprintf "%x", $foo; $hex_code2 = sprintf "%x", shift @a; $hex = $hex_code1.$hex_code2; $dec = hex $hex; $ascii = chr $dec; print $ascii; } # Notes $$ is the $PID, I substitute $foo just because # %x is unsigned integer in hex so sprintf %x, $foo converts $foo # to hex. # The '%x'x2 is the same as "%x%x" # sprint "%x%x", $a ,$b; shoves both $a and $b into hex format

In reply to Re: Not so cryptic by tachyon
in thread Not so cryptic by iamcal

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.