----- Original Message ----- 
From: "Perl Help" <perlhel...@gmail.com>

> Any help is much appreciated.

A less solution that doesn't re-invent any wheels:

##################################
use Win32::Console;
use warnings;
use strict;

$| = 1;
my $c = new Win32::Console STD_OUTPUT_HANDLE;
$c->Alloc();
my $current = $c->Attr();

my $current_fg = $current & (FOREGROUND_RED | FOREGROUND_BLUE
                 | FOREGROUND_GREEN | FOREGROUND_INTENSITY);

my $current_bg = $current & (BACKGROUND_RED | BACKGROUND_BLUE
                 | BACKGROUND_GREEN | BACKGROUND_INTENSITY);

$c->Attr(FOREGROUND_RED | FOREGROUND_INTENSITY | $current_bg);

print "ERROR_MSG = xyz";
$c->Attr($current);
##################################

But I don't see how to achieve it with Win32::Console::ANSI - mainly because 
I don't see how to

print color 'bold red on current background';
or
print colored ("ERROR_MSG = xyz", 'bold red on current background');

Do you need to use Win32::Console::ANSI ?

Cheers,
Rob 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to