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
