#!/usr/bin/perl use strict; use warnings; use Tk::Text; use Tk; my $mw = tkinit; my $text = $mw->Text()->pack; $text->insert('end','Dies ist ein roter Test' ); $text->tagAdd('red_text',1.13,1.18); $text->tagConfigure('red_text', -foreground => 'red'); MainLoop;