in reply to Word Colors

For the standard windows shell, you need an ANSI interpreter running or else ANSI sequences won't be interpreted. Get ANSI.COM e.g. from http://www.salokin.demon.co.uk/dos_tips.htm. After running it, type bas.txt will show that Term::ANSIColor performs correctly. (Caveat: I don't know whether NT will allow this).

Which means that you probably have to go a different route to not be dependant on an ANSI interpreter...

By the way, rxvt (shipped e.g. with msys/mingw) displays the file just fine -- it interpretes ANSI color sequences by itself.

Replies are listed 'Best First'.
Re: Re: Word Colors
by Mr. Muskrat (Canon) on Aug 28, 2002 at 23:06 UTC
    Windows NT, 2000 and possibly XP do *not* do ANSI color even if you load ansi.sys. If you really need colored text in a "command" window then you have several choices... cygwin or find a way to make BIOS calls from within Perl. I haven't tried the second one but it sure sounds like fun! :) Uh, oh... now I'm gonna have to try.
      You CAN use colors in a DOS box under NT4 or Windows 2000. You have to load system32/ansi.sys in config.nt and use command.com instead of cmd.exe as shell. Unfortunately running perl in such a color DOS box still won't color its output - i think perl uses cmd.exe. How can perl be persuaded to use command.com instead ?