in reply to Re^2: change/detect term screen background color
in thread change/detect term screen background color

okay, it works if I add this after the color change:

system("clear");

Replies are listed 'Best First'.
Re^4: change/detect term screen background color
by Allasso (Monk) on Feb 19, 2011 at 20:20 UTC

    here is an example that works:

    change screen color for a script, then change it back when script exits:

    #!/usr/bin/perl use strict; use warnings; # change bgcolor and text system("echo -e '\e[44m'"); system("clear"); print "interactive script with blue background...\n\n"; print "press return to exit script:\n\n"; <STDIN>; # revert to original color system("echo -e '\e[0m'"); system("clear");
    Anyway, thanks for getting my brain going.