Trick number one in parsing em, Add white space...
@_=(4,-16,17,-12.4,9,-13.17,-8.14,8,-19.4,0,18,14,-20.17,5,6,11 ,-7.19,10,2,3,1,-15.7);do{($=,$-)=(@_[$_]>=0?(-@_[$_],$_):split /\./,@_[$_]);$$[-$=]=pack q#C#,$-+=65;}foreach(0..$#_);print@$; # becomes. Note the # comments on some lines @_ = # @_ is a special list variable, thus =( implies a list. ( 4,-16,17,-12.4,9,-13.17, # big list of data... 22 in fact -8.14,8,-19.4,0,18,14, # lots of decimals -20.17,5,6,11,-7.19, # lots of negatives 10,2,3,1,-15.7 ); # ); is end of list. do { # do turns a block into a statement that can take loop modifiers ($=,$-)= # $= and $- are print format variables # wrapped in parens, they want a list. ( # ahh, a paren for a list! @_[$_] >= 0 # Conditional test for the ?: operator + tests for negative ? ( -@_[$_], $_ ) # If true, return a list of -neg value +, counter : split /\./ , @_[$_] # If false, split on . ); # end of assignment list $$[-$=] = # oh god is @$ a legal array? *sob* yes... # what does a negative array count do? pack q#C#, $- += 65; # pack 'C' is for unsigned chars # 65 is the offest to lowercase 'a' in asc +ii } foreach (0..$#_); #loop modifier for do block #loops from 0 to 21, the size of @_ print @$; #print the array!

Does that help any? You generally have to read character by character and be aware of the special variables to parse these things, then you start spotting structures once you see the variables and assignments.

--
$you = new YOU;
honk() if $you->love(perl)


In reply to Re: Re: JAPH the First (SPOILER!) by extremely
in thread JAPH the First by Blue

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.