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

 

Reply via email to