Keep It Simple, Stupid | |
PerlMonks |
Re: Re: Re: Style, *again*by Rich36 (Chaplain) |
on Apr 09, 2003 at 19:04 UTC ( [id://249355]=note: print w/replies, xml ) | Need Help?? |
* No here-documents, but multi-line q/qq. Even repeated prints are better :)
That's actually not true about the here-doc end marker not being able to be indented. pgs. 23-26 (ch. 1.11) of the Perl Cookbook give a few examples of how to do that. Below is an example with 4 space indents in front of each of the lines.
This code strips out the leading spaces in the text so that you don't have extra spaces there. It still has the drawback that if you change the spacing it will break unless you adjust the <<' EOT' declaration as well, but at least it lines up better in the code. On another note, great list and thanks for sharing it. «Rich36»
In Section
Meditations
|
|