Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I'd like to be able to print out certain status codes in the color red in order to make them stand out. I am running Windows 2000 & Windows NT. I've tried Term::ANSIColor, but it only prints out the escape sequences and no color is displayed. I've searched microsoft's developer site, but i cannot seem to find any way to change the WinNT/2K terminal's colors programmatically! I know you could do it in DOS by loading & calling ANSI.SYS, however that was a DOS driver and does not work under NT.

Does anyone know how to display colored text under WinNT/2K using Perl?

Thanx,

Rob

Replies are listed 'Best First'.
Re: Windows 2000 cmd terminal color
by Trinary (Pilgrim) on Apr 27, 2001 at 02:16 UTC
    My first guess would be Win32::Console (standard in Activestate).

    From what I can see in the docs, you or together a bunch of attribute flags if you want special attibs on your output, and this includes some color support.

    Hope this helps...

    Trinary

Re: Windows 2000 cmd terminal color
by rchiav (Deacon) on Apr 27, 2001 at 03:00 UTC
    Or, if want to directly modify the colors through the console, type color /?.

    Rich