in reply to best way to print paragraphs of text

Hi Keiusui,

For the example you're provided above, you could probably do as CountZero suggests and just quote the string. However if you really want that formatting to print as you've typed it, you could use a 'theredoc', rather than a heredoc.

You can do this by placing your code above in a variable, or if you need to interpolate stuff at runtime, use a sub instead.

my $monday_doc = << 'OUTPUT'; Today is Monday, my favorite day of the week. It is my favorite day b +ecause Jerry said "Monday is the best day of the week". Tuesday is m +y second-favorite day. Why can't all days be as great as Monday? Wh +o knows. OUTPUT if($today eq 'Monday'){ print $monday_doc; }