in reply to Is it possible to include colored text in formatted output using write
Hi, from the doc for Term::ANSIColor:
It's not possible to use this module to embed formatting and color attributes using Perl formats. They replace the escape character with a space (as documented in perlform(1)), resulting in garbled output from the unrecognized attribute. Even if there were a way around that problem, the format doesn't know that the non-printing escape sequence is zero-length and would incorrectly format the output. For formatted output using color or other attributes, either use sprintf() instead or use formline() and then add the color or other attributes after formatting and before output.
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to include colored text in formatted output using write
by fireblood (Scribe) on May 12, 2023 at 16:21 UTC |