Hi Bill, Thanks for your response. DId you try running CLS command after executing the code. When I do that, it switches my FG/BG color to default that is White on Black. More so, my code is not showing the same results as you described. Is there any other file I need to take care off? Do you want me to send you the screen shot how it looks like when I run the program?
Thanks once again for your help, ~Jai! On Thu, Mar 26, 2009 at 3:53 PM, Bill Luebkert <[email protected]>wrote: > Perl Help wrote: > >> Hi, >> >> My current DOS background color is white with Black text. I use ANSIColor >> module to print error messages in Red color. I use the Color command and I >> face two issues: >> >> 1. The Red color error message text thats printed on DOS has black >> background, instead of white only. >> 2. On typing CLS the background color changes to black and text color >> changes to white. >> >> What is my Expectation: >> 1. On prinitng the text in red color should not have the background color >> black but use the current DOS background color(White in my case). >> >> 2. On doing CLS on DOS, the dos should maintain its background color(White >> in my case) rather then setting it to default black background color. >> >> My Code: >> use Win32::Console::ANSI; >> use Term::ANSIColor; >> print color "Bold Red"; >> print "ERROR_MSG = xyz"; >> print color 'reset'; >> > > Seems OK to me on 5.8.8 B820. 5.001 & 5.006 on the modules, resp. > > > p test.pl [switched my FG/BG to reverse (black on white) > prior to test > Prior to error [black on white] > ERROR_MSG = xyz [this was red on white] > Done [black on white] > > Everything came out fine as near as I can tell. > > My code: > > use strict; > use warnings; > use Win32::Console::ANSI; > use Term::ANSIColor; > > print "Prior to error\n"; > print color "Bold Red"; > print "ERROR_MSG = xyz\n"; > print color 'reset'; > print "Done\n"; > > __END__ > >
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
