The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/local/bin/perl -w

use Tk;

my $mw = MainWindow->new;

my $t = $mw->Text(-background => 'yellow', -width => 30, -height => 10);
$t->pack(-expand => 1, -fill => 'both');

$t->insert('1.0','This is Text','Atag');
$t->tagConfigure('Atag',-background => 'green');

$mw->Button(-text => "Change Colour",
            -command => sub { $t->tagConfigure('Atag',-background => undef) }
           )->pack;

MainLoop;