Beau E. Cox wrote:
>> -----Original Message-----
>> From: Daryl [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, February 14, 2003 12:49 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: On STDOUT show matched words in color
>> --On 13 February 2003 22:11 -0800 "Alan C." <[EMAIL PROTECTED]>
>> wrote:
>>
>>> On Windows to have Perl search a text file and display all of
>> the file on
>>> STDOUT but the matched words to show in color.
>>> I can do some regex.  But I haven't a clue about how to color
>>> matched words or if it can be done on Windows.  I know the Vim
>>> editor can do that.  But I want to accomplish it on STDOUT using
>>> Perl.
>>> STDOUT is what normally prints to the command prompt screen, right?
>>
>> Yup, STDOUT is to the screen, unless reassigned.
>> As for printing in colour - I don't believe that the windows command
>> processor, ie cmd.exe, is capable of printing in colour. You
>> could install
>> Cygwin(some unix tools for windows) & use bash(an alternative shell)
>> in place of the standard windows shell, that may work.
>>
>> Hope thats of some help
>>
>> Daryl
>
> Or you could use 'Win32::Console' (packaged with ActivePerl).
> You can assert complete control of the screen with this
> module. See the docs.
>
> Aloha => Beau.

Or, for a 'lite' version, Term::ANSIColor.

Cheers,

Rob




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

Reply via email to