in reply to breaking long lines in my code
Still another approach, one that I prefer:
print join(" ", "Here's a long line blah blah", "blah that I would like broken up\n" );
This has a modest performance penalty over the original version (the join()) but has the distinct advantage of being nicely formattable by syntax editors (such as XEmacs, which I use).
The same technique can be used to coalesce a series of separate print statements into one, which is how I use it mostly, to erduce the number of calls to print(), on the theory that IO statements are more expensive than memory-based ones (particularly when autoflush in enabled, e.g., $|=1, as is often the case with CGI scripts).
print join("\n", "This is line 1", "This is line 2", "This is line 3", # etc. "This is line n"), "\n";
dmm
If you GIVE a man a fish you feed him for a day
|
|---|