On Feb 1, 11:43 pm, [email protected] (Paryushan Sarsamkar) wrote: > I wanted to print some text on windows cmd in different colors, below is the > code that I am using which works fine on unix but not on windows L > > #!/usr/bin/perl > > use strict; > > use warnings; > > use Term::ANSIColor; > > print color("red"), "Stop!\n", color("reset"); > > print color("green"), "Go!\n", color("reset"); > > output - > > ←[31mStop! > > ←[0m←[32mGo! > > ←[0m > > Thanks, > > Paryushan
You need to add: use Win32::Console::ANSI; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
