Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I notice your use of the indirect object form at the very end to avoid parens around (just) brackets. But didn't do so in the other place, because it's not at the end. Moving one paren doesn't make it much better. But you could use feed notation and lose the parens in both places:
$result= ( $x.split('') ==> map { %rtoa{$_.uc} } ==> reduce { $^a+$^b +-$a%$b*2 } );
but you still wind up with one paren after a brace. Or if you reversed the written order, so "everything to the right" is indeed the argument to the listop, I think this works:
reduce {$^a+$^b-$a%$b*2 } map { %rtoa{$_.uc} } $x.split('');
which makes me think that there is merit in doing it that way as originally presented. listops are naturally written with the processing sequence in the opposite order. Fighting it means adding parens, no matter how you try.

In reply to Re^2: Rosetta PGA-TRAM by John M. Dlugosz
in thread Rosetta PGA-TRAM by eyepopslikeamosquito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found