#!/usr/bin/perl use strict; use warnings; # change bgcolor and text system("echo -e"\e[1;32;40m black"); sleep 5; # revert to original color system("echo -e "\e[0m"); #### #!/usr/bin/perl use strict; use warnings; use Term::Cap; use Term::ExtendedColor qw(fg get_colors lookup); use Data::Dumper::Concise; my $termcap = Term::Cap->Tgetent({ Term => 'undef' }); print "Capabilities found: ", join(', ', sort(keys %{$termcap})), "\n"; print Dumper(my $colors = get_colors()); for(0 .. 255) { my $color_str = lookup($_); if(defined($color_str)) { printf("%25s => %s\n", fg($color_str, $color_str), $_); } }