Je souhaite mettre de la couleur sur ce que j affiche ( print )
j ai trouvé ceci ... malheuresement ca ne marche pas .
Mon code
J obtien ceci dans mon invite de commande
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #!/usr/bin/perl 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";
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 C:\Documents and Settings\Greg\Bureau>test.pl ←[1;34mThis text is bold blue. ←[0mThis text is normal. ←[33;45mYellow on magenta. ←[0mThis text is normal. ←[33;45mYellow on magenta. ←[0mboldred←[1m←[34mThis text is in bold blue. ←[0m←[1m←[34mThis text is in bold blue. ←[0m←[0mThis text is normal.
quelqu un pourait il m aider? est ce moi qui n est pas installé le module correctement , peut etre que ce n est pas necessaire ...?( je dispose d ActivePerl 5.8.7.813 ) et j ai essayé d installé le module ansicolor vu que je savais pas trop .. j ai essayé je sais pas si je l ai bien fait a un moment j ai tappé makefile.pl il ma ecrit
peut etre que ca pourra peut etre aidé a ma resolution . Merci d avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 C:\ANSIColor>makefile.pl Writing Makefile for Term::ANSIColor
Partager