Perl 里面的输出颜色
#!/usr/bin/perl
use Color::Output;
Color::Output::Init;
cprin(" Test Color\n",0);
cprin(" Test Color\n",1);
cprin(" Test Color\n",2);
cprin(" Test Color\n",3);
cprin(" Test Color\n",4);
cprin(" Test Color\n",5);
cprin(" Test Color\n",6);
cprin(" Test Color\n",7);
cprin(" Test Color\n",8);
cprin(" Test Color\n",9);
cprin(" Test Color\n",10);
sub cprin
{
($str,$i)=@_;
cprint("\x03" . $i . "$str\x030");
}
网上找的代码, 记录下。 以后怕用的上
阅读(285) | 评论(0) | 转发(0) |