in reply to adding carriage return to gmail script

You are putting a "\n" after the array, so the script is doing what you asked. Perhaps instead you want to do something like join("\n",@push_list) . "\n total files .." instead.

Alex / talexb / Toronto

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

Replies are listed 'Best First'.
Re^2: adding carriage return to gmail script
by BillKSmith (Monsignor) on Jun 14, 2016 at 03:20 UTC
    No need for join. Use $" ($LIST_SEPARATOR).
    Bill

      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