Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Formatting Strings Without Interpolating Whitespace

by kejohm (Hermit)
on Jan 19, 2012 at 21:56 UTC ( #948854=note: print w/ replies, xml ) Need Help??


in reply to Formatting Strings Without Interpolating Whitespace

You could use a here-doc, like this:

my $msg_body_2 = <<"EOT"; line 5 line 6 line7a\tline7b line8 EOT

or you could split the string in to segments spread over multiple lines and concatenate them together:

my $msg_body_2 = "\n\n" . "line 5\n" . "line 6\n" . "line 7a\tline7b\n" . "line 8\n" . "\n\n";


Comment on Re: Formatting Strings Without Interpolating Whitespace
Select or Download Code
Re^2: Formatting Strings Without Interpolating Whitespace
by BJ_Covert_Action (Beadle) on Jan 19, 2012 at 22:25 UTC

    The concatenation option is the simplest and easiest for me to work in now. I'll try to fiddle with some of the other options later, but for now this works perfect. Thanks for the tip kejohm. I didn't realize you could space concatenation operators across multiple lines.

    Cheers,
    Brady C. Jackson

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-07-10 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (203 votes), past polls