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

Re: Formatting Strings Without Interpolating Whitespace

by chromatic (Archbishop)
on Jan 19, 2012 at 21:54 UTC ( #948853=note: print w/ replies, xml ) Need Help??


in reply to Formatting Strings Without Interpolating Whitespace

This answer seems so facile that I'm certain I must have missed something, but what if you remove \n from within your strings?

(In this case I prefer to use a heredoc, but a multi-line quoted string also works.)


Improve your skills with Modern Perl: the free book.


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

    That was actually my first solution, but when I start increasing the complexity of the formatting from what I've shown here, that solution falls a bit short. Still, not a bad way to brute force it if I don't want to risk exploding my code all over the place by testing Xiong's solution.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2015-07-06 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls