Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
We may not need a cat but we really do need an append (i.e the p6 equivalent of $string .= $appended_text) and if you have no cat operator then you can't have a nice append operator related to it. I suppose that if you rule that interpolation ("") is the way to go then you could go for "= but I think that would break many colouring editors not to mention cause a lot of people to get very confused.

Of course if you define cat as join('', list) then it might be reasonable to create an append($target, list) function but that does rather add to the verbiage AND change the way you look at the operation. To me, at least, opeators are cheap and quick functions are generally slower and more expensive. concatenate and append should IMO be looked on as cheap and quick because they are.

Another possibility that I just thought of while writing this is that append could be written using print $target list but that opens a whole can of mainainability worms as $target could either be a filehandle or a string and I see no easy way to make it clear which it is in a particular context.

PS For those who understand pantomime, does this thread sound a little familiar?

Dingus


Enter any 47-digit prime number to continue.

In reply to Re: We don't need a cat by dingus
in thread We don't need a cat by John M. Dlugosz

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.
  • 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 exploiting the Monastery: (2)
    As of 2025-06-22 02:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.