#!usr/bin/perl use warnings; use strict; use Tk; use Tk::Text; use vars qw($text); &init_ui; $text->insert('0.0', "First\n"); $text->insert('end', "Second\n"); $text->insert('end', "Third\n"); $text->markSet("Foo"); ## Not sure about this MainLoop; sub init_ui { my $mw = MainWindow->new( -title => 'Mark in Text ??'); $mw->resizable(0,0); $text = $mw->Scrolled(qw/Text -relief sunken -borderwidth 2 -height 12 -width 35 -wrap word -scrollbars e/ )->pack(-side => 'top'); }