in reply to Suggestion: Optional Line Numbering Tag for CODE
You want to make sure to make newcomers read the UNIX "cat" command help page first. Most "cat" implementations will have switches to display numbers. E.g., for the GNU "cat" found on Linux boxes, use -n (number all lines) or -b (number all non-blank lines). For those trapped on Win32 machines, the following one-liner will do the thing:
perl -pe "s/^/++$i.' 'x4/e" filename
OTOH, will a newbie read the docs on the new proposed tag or on all the other countless ways to do this seemingly innocent task (vi: set nu, etc. ...)? Probably not. Thus: why bother, I'd say.
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
|
|---|