hotshot has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I'm trying to use colors in my application (perl 5.8.0 on Linux) and have some difficulties combining it with printf(). Example:
I'm trying to use colors in my application (perl 5.8.0 on Linux) and have some difficulties combining it with printf(). Example:
Why adding the underline constant messes with my spacing?# when I perform: printf "\n\t%-25s| %-25s\n", 'Filename', 'Comment'; # I get on STDOUT Filename Comment # please note the spacin +g # when I perform printf "\n\t%-25s| %-25s\n", RED . 'Filename' . RESET, UNDERLINE . 'Co +mment' . RESET; # the same spacing as above # I get on STDOUT Filename Comment # each underlined, but the spacing + is changed somehow
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem printing in colors
by salva (Canon) on Apr 28, 2005 at 16:15 UTC | |
Re: Problem printing in colors
by blazar (Canon) on Apr 28, 2005 at 16:35 UTC |
Back to
Seekers of Perl Wisdom