more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Editability is about using a decent editor. For example, in Emacs you can convert between block "if" and statement-modifier "if" with a single command. If your editor can't do that, then I would argue it's your editor's problem...
I wouldn't use either form; they both get too far away from mpeever's ideal, which I share, of code that reads like English. If you want to print a bunch of lines to STDERR, I personally believe it's best to say "I want to print a bunch of lines", not "I want to build a string by joining a bunch of lines with newline characters, and then print that" or "I want to map a bunch of lines to a new array where they're terminated with newline characters, and then print that". In other words, I'd write: print STDERR "$_\n" for @lines;or, better still, say STDERR $_ for @lines;if you're lucky enough to have an up-to-date Perl, which of course many of us don't, in the workplace. In reply to Re^2: Code Maintainability
by Porculus
|
|