in reply to Re: Merging of custom array
in thread Merging of custom array

The newline would have been a problem with print.

Not if you set the OUTPUT_RECORD_SEPARATOR like say() does:

local $\ = "\n";

Replies are listed 'Best First'.
Re^3: Merging of custom array (updated)
by haukex (Archbishop) on Jul 20, 2019 at 08:18 UTC
    set the OUTPUT_RECORD_SEPARATOR like say() does

    I was surprised by this, and then noticed that you were referring to the say docs. However, IMHO they're wrong, say doesn't seem to set a local $\, so I just filed bug #134298 to hopefully clarify/fix the documentation.

    Update: A patch has been applied, the say docs in the next release will say:

    Just like print, but implicitly appends a newline at the end of the LIST instead of any value $\ might have.