Jul 242010
Multiline string in Perl
Answer:
You can either use the q operators.
my $s = q#''''"
test
"""'
#;
print $s;
Or qq operators if you need interpolation.
my $d = "test";
my $s = qq#''''"
$d
"""'
#;
print $s;
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Multiline string in Perl
Answer:
You can either use the q operators.
my $s = q#''''"
test
"""'
#;
print $s;
Or qq operators if you need interpolation.
my $d = "test";
my $s = qq#''''"
$d
"""'
#;
print $s;