How to get colored output with printf?

Posted by sid_com on Stack Overflow See other posts from Stack Overflow or by sid_com
Published on 2010-03-15T07:24:34Z Indexed on 2010/03/15 7:39 UTC
Read the original article Hit count: 149

Filed under:

Hello, is there a way to get with printf colored output?

use warnings; 
use strict;
use Term::ANSIColor;

printf "%4.4s\n", colored( '0123456789', 'magenta' );

Output: (only newline)

© Stack Overflow or respective owner

Related posts about perl

Related posts about color