Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Merging of custom array

by jwkrahn (Abbot)
on Jul 19, 2019 at 19:40 UTC ( [id://11103045]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found