Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Printing array in scalar context

by TomDLux (Vicar)
on Aug 08, 2011 at 17:34 UTC ( [id://919285]=note: print w/replies, xml ) Need Help??


in reply to Printing array in scalar context

If you do put the whole thing in a double-quoted string, the $" separator would apply between array elements, introducting a space at the beginning of each line, other than the first. You would need to localize it to be an empty string, if you wanted to avoid additional characters.

{ local $" = q{}; print "@content\n\n"; }

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found