How do I color text in Perl's standard output without using any extra module?
+4
A:
Using BASH? Check here: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
eumiro
2010-09-28 09:51:31
using Perl..........
Tree
2010-09-28 09:54:47
If you don't want to use any extra perl module, then you have to print those special characters in the perl's stdout. A color of the character is interpreted by bash, so if you use bash, you have to use its color encoding described in that document.
eumiro
2010-09-28 09:56:52
Terminal control sequences are interpreted by your terminal program or console driver, not by bash.
Peter S. Housel
2010-09-28 16:05:51
Or just [copy its source code](http://cpansearch.perl.org/src/RRA/ANSIColor-3.00/ANSIColor.pm)
mobrule
2010-09-28 13:37:44
Although copying its source code it topologically the same as installing it. :)
brian d foy
2010-10-11 20:34:20
+5
A:
Have a look at http://en.wikipedia.org/wiki/ANSI_escape_code to know which control sequences to output if you do not want to use any module.
jeje
2010-09-28 11:15:59