in reply to Re^2: using colors with print()
in thread using colors with print()

Term::ANSIColor will do what you want in the easiest possible way. The docs and source explain how printing ANSI escape sequences causes your terminal to do (color) stuff
$cat color.pl
#!/usr/bin/perl
use Term::ANSIColor qw(:constants);
print BOLD, BLUE, "This text is in bold blue.\n", RESET;
print RED, "This text is red.\n", RESET;

$ ./color.pl
This text is in bold blue.
This text is red.
$

To set the AUTORESET feature so you can loose the RESET tokens set $Term::ANSIColor::AUTORESET = 1 just after the use. RTFS to see the available constants. Don't use BLINK :o)

cheers

tachyon

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.