Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Perl
$s =<<EOSTR;
One of the ways to create multiline text 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
$s = "Perl normally allows
strings to contain newlines.";
$s = q{
There are a good few ways to create multiline
text strings in perl.
};
s : String := "Will this compile? " &
     "Oh yes it will";

I'm assuming this is what is meant by "consisting in several lines of text."

Use New_Line for line feeds.

New implementation...