-
方法一
Term::ANSIColor的函数color有以下参数:
clear, reset, dark, bold, underline, underscore, blink, reverse, concealed, black, red, green, yellow, blue, magenta, cyan, white, on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, and on_white
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/usr/bin/perl use Term::ANSIColor; print color "red"; print "REDn"; print color "green"; print "GREENn"; print color "bold blue"; print "BOLD BLUEn"; print color "on_yellow"; print "ON YELLOWn"; print color "on_cyan"; print "ON CYANn"; print color "reset"; |