keiusui has asked for the wisdom of the Perl Monks concerning the following question:
However, let's say I want to print out code from within an if statement:print <<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
The only issue is that I cannot indent all of the code within the curly brackets because then Perl doesn't see the last OUTPUT.if($today eq 'Monday') { print <<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 }
What would be the best way to print out paragraphs of text in such a way that they could be indented within the code?
Thank you so much for your help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: best way to print paragraphs of text
by CountZero (Bishop) on Aug 08, 2009 at 22:02 UTC | |
by AnomalousMonk (Archbishop) on Aug 08, 2009 at 22:31 UTC | |
by SFLEX (Chaplain) on Aug 09, 2009 at 10:04 UTC | |
|
Re: best way to print paragraphs of text
by desemondo (Hermit) on Aug 08, 2009 at 22:14 UTC | |
|
Re: best way to print paragraphs of text
by Your Mother (Archbishop) on Aug 08, 2009 at 22:18 UTC | |
|
Re: best way to print paragraphs of text
by ELISHEVA (Prior) on Aug 08, 2009 at 23:33 UTC | |
|
Re: best way to print paragraphs of text
by JavaFan (Canon) on Aug 08, 2009 at 23:34 UTC | |
by AnomalousMonk (Archbishop) on Aug 09, 2009 at 04:14 UTC | |
by JavaFan (Canon) on Aug 09, 2009 at 14:15 UTC | |
by Anonymous Monk on Aug 09, 2009 at 06:13 UTC |