Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
veRy Nic3 !
Here is my solution to this riddle ;)

The core of the job is done by the first map which will crypt the 6 words of the string "writing Library. Building consider TO($FOO) *binary*" (split on space) with the numbers at the begining of the list @:: ( obtained with shift ) .

This step can be rewrited as :

@keys=qw'79 11 34 69 41 27'; @list_to_crypt = split/ /, 'writing Library. Building consider TO($FOO +) *binary*' ; @result=map{ crypt ($_.' ', shift @keys) } @list_to_crypt ;
If you print @result you will see :
79jUStLZ6Ck9c 11anOTHZ33A12 34ERehEMmayDo 69pERLsGUZYU2 41HAcKS9/lrEQ 27eRTYtC6a5HI
Now, in the same map liverpole pops the value at the end of @:: into $x , which is used into a regexp against the crypted values . This can be rewriten as :
@matcher = qw'2 4 4 2 5 4' ; foreach $crypted (@result ) { $x = pop @matcher ; $crypted =~/..(.{$x}).*/g ; push @final, $1 ; }
If you print @final you get :
The match is fairly understandable : it could read as "any character", "any character", "remember those next $x any character", "anything till the end of line" . And as it happens, $x selects the characters we need from @result !

And the next map is giving the proper formating .

But there is one last thing that i didn't know here : in the first map, the value returned by the map function is what was matched in the regexp ! Now that's interesting !!

In reply to Re: Crypto Japh by secret
in thread Crypto Japh by liverpole

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, 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
  • 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (4)
    As of 2018-03-19 02:13 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (231 votes). Check out past polls.