在windwos控制台文本的颜色输出

1.安装Win32::Console::ANSI (注意和Win32::Console不同)

perl -MCPAN -e shell
cpan> install Win32::Console::ANSI

2. Term::ANSIColor

use Win32::Console::ANSI;
use Term::ANSIColor;

print color("blue"), "blue\n", color("reset");
print "normal\n";
posted @ 2013-02-16 00:07  新闻官  阅读(169)  评论(0编辑  收藏  举报