CMD-Colors
view release on metacpan or search on metacpan
example/ConsoleColors.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use CMD::Colors;
## Example Usage
Cprint('hello, This is RED text', 'red');
Cprint("\nhello, This is RED text with WHITE background", 'red', 'white');
Cprint("\nhello, This is RED (Bold) text", 'red', undef, 'bold');
Cprint("\n");
exit;
## Demo ##
foreach my $color (keys %{$COLOR_CODES{'foreground'}}) {
Cprint("This is $color text", $color);
print "\n";
foreach my $bgcolor(keys %{$COLOR_CODES{'background'}}) {
Cprint("This is $color text with $bgcolor background", $color, $bgcolor);
print "\n";
}
}
( run in 1.614 second using v1.01-cache-2.11-cpan-7fcb06a456a )