"be consistent" | |
PerlMonks |
Re: breaking long lines in my codeby dvergin (Monsignor) |
on Feb 07, 2002 at 17:41 UTC ( [id://143936]=note: print w/replies, xml ) | Need Help?? |
No. You can do that,
but it will effect the printed output.
And you are asking if you can do it without changing the
output.
But ++ for the motivation to format your code for readability. There are many, many situations where you can break a line of code in the middle without hurting things. I would go so far as to say you can do it in most cases. (White space is white space: \n is as good as \s or \t.) And inserting a newline here will not break the code, but it does change the output. So...
Note here that the comma works specifically because of "print"s ability to handle a series of values. But comma will not work for $somevar = "...". For that, the dot concatenation approach does the job.
In Section
Seekers of Perl Wisdom
|
|