I am going to break one of my rules and suggest a non-perl solution.  There
probably is a way to do this in perl however if I understand your requirement
correctly you can use a good text editor instead.  There are text editors out
there that do syntax highlighting -- they will make comments, reserved words,
etc. each appear in a user configurable color.  They usually have a
"pretty-print" option that prints out the file WYSIWYG ("What You See Is What
You Get" for those of you not familiar with that acronym).  I know that Xemacs
allows this and I sure there are others.  See http://www.xemacs.org for
details.

One last suggestion.  If you are working in an environment where there is (or
might be) more than one person working on a piece of code (or html or whatever)
then everyone probably does not use the same text editor (or code editor).
Therefore I would recommend that you do not use tabs at all for indenting etc.
you should use spaces since all editors do not handle tabs the same way.  Many
text editors allow you to either insert x number of spaces every time the tab
key is pressed or convert tabs to spaces once you are done editing or
something similar.  We have this problem where I work every time someone new
starts and has not set up their editor to insert spaces instead of the tab
character and it is quite annoying for everyone involved.


        HTH,
                    Gary

Booher Timothy B 1stLt AFRL/MNAC wrote:

> Hello - when printing out a lot of my c++ code I go from a nice color
> syntaxed environment to a plain old black and white.
>
> If there isn't already something else out there I would like to write a Perl
> script that changes all comments to green for example and preserves the tab
> spacing into the html file. I am about to roll up my sleeves and start on
> this, but ya'll seem to know what is out there - does this exist already?
>
> Thanks,
>
> tim

--
Gary Ebert                            Manager Network Operations
Voice:     (301) 428-2100 X2115       Comtech Mobile Datacom Corporation
Fax:       (301) 428-1004             19540 Amaranth Drive
Mobile:    (301) 332-4930             Germantown, MD  20875-2126



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to