Welcome to the Monastery | |
PerlMonks |
Re: Formatting Strings Without Interpolating Whitespaceby JavaFan (Canon) |
on Jan 19, 2012 at 22:20 UTC ( [id://948856]=note: print w/replies, xml ) | Need Help?? |
I don't only get character breaks on \n, I get character breaks on \n and every time I add an actual carriage return to the string with the "Enter" buttonWell, yes, of course. (Although, since you use single quotes in your code snippets, \n aren't interpolated -- but I'll consider that a copy-and-paste error). What do you expect Perl to do? Ignore your \ns? Ignore your newlines? Why should it? If you have newlines in your strings (be it because of \n, or a "real" newline) that you don't want, don't put them there!
In Section
Seekers of Perl Wisdom
|
|