Reputation: 17724
Is it possible to tell Perl to ignore linebreaks in Strings?
I need linebreaks for formatting reasons as I have very long strings.
E.g.
print "hello
world"
shall give
hello world
and not
hello
world
Upvotes: 1
Views: 115
Reputation: 21676
1. Using concatenation
print "hello ". "world";
2. By sending multiple arguments to print function
print ("hello ", "world");
Try it on codepad.
Upvotes: 0
Reputation: 434785
You can pass multiple strings to print
instead of one big one:
print "hello", "world";
Assuming of course that you haven't been messing around with $,
and that you're really using print
.
Upvotes: 2