History of Idiom 48 > diff from v14 to v15
Edit summary for version 15 by :
↷
Version 14
2015-10-22, 01:00:55
Version 15
2015-10-29, 14:05:14
Idiom #48 Multi-line string litteral
Assign to variable s a string litteral consisting in several lines of text
Idiom #48 Multi-line string litteral
Assign to variable s a string litteral consisting in several lines of text
Code
$s = "Perl normally allows
strings to contain newlines.";
$s = q{
There are a good few ways to create multiline
text strings in perl.
};
$s =<<EOSTR;
One of them is called the "here doc" (lifted from various UNIX shells).
A 'here doc' is the <<tag construct. Perl continues to treat
all the text found as part of the string until there's a line containing
the EOSTR tag at the beginning
EOSTR
Code
$s = "Perl normally allows
strings to contain newlines.";
$s = q{
There are a good few ways to create multiline
text strings in perl.
};
$s =<<EOSTR;
One of them is called the "here doc" (lifted from various UNIX shells).
A 'here doc' is the <<tag construct. Perl continues to treat
all the text found as part of the string until there's a line containing
the EOSTR tag at the beginning
EOSTR
Comments bubble
Comments bubble