in reply to breaking long lines in my code
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.print "Here's a long line blah blah " . "blah that I would like broken up\n"; #or print "Here's a long line blah blah ", "blah that I would like broken up\n";
|
---|