標準出力に色を付ける
CUIで一覧表示するプログラムを作った時なんかに便利です。NG行だけ色をつけるとか。
http://search.cpan.org/~rra/ANSIColor-1.12/ANSIColor.pm
use Term::ANSIColor; print color ’bold blue’; print "This text is bold blue.\n"; print color ’reset’; print "This text is normal.\n"; print colored ("Yellow on magenta.\n", ’yellow on_magenta’); print "This text is normal.\n"; print colored [’yellow on_magenta’], "Yellow on magenta.\n"; use Term::ANSIColor qw(uncolor); print uncolor ’01;31’, "\n"; use Term::ANSIColor qw(:constants); print BOLD, BLUE, "This text is in bold blue.\n", RESET; use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";