use strict; use Tcl::Tk; my $int = new Tcl::Tk; $int->Eval (<<'EOS'); # here goes Tk code to construct GUI pack [text .t] pack [button .b -text button] EOS # and here goes main code with perl/Tk syntax my $txt = $int->widget('.t','Text'); $txt->insert('end',"text text tex"); $int->MainLoop;