Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: adding carriage return to gmail script

by BillKSmith (Monsignor)
on Jun 14, 2016 at 03:20 UTC ( [id://1165522]=note: print w/replies, xml ) Need Help??


in reply to Re: adding carriage return to gmail script
in thread adding carriage return to gmail script

No need for join. Use $" ($LIST_SEPARATOR).
Bill
  • Comment on Re^2: adding carriage return to gmail script

Replies are listed 'Best First'.
Re^3: adding carriage return to gmail script
by talexb (Chancellor) on Jun 14, 2016 at 18:19 UTC

    Technically, that's correct. Realistically, that's a terrible solution -- putting newlines in between each of the elements in the list is a much clearer way to write this code. Keep in mind that your code should strive to be as clear as possible. That usually doesn't mean that it should be as clever as possible.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      Yes, we should strive for clarity. I fail to see how using a perl feature exactly as it is intended is less "clean" or "clear" than code which simulates that feature. I doubt that there is single right answer. We have given the OP a choice. Neither of us should be too concerned about his choice.
      Bill

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1165522]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-24 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found