use Tcl::Tk qw(:perlTk); my $int = new Tcl::Tk; $int->Eval(<<'EOS'); #...you...paste...tcl/tk code here # or write it source /path/to/my/file EOS # here you can access Tcl/Tk widgets by using my $button = $int->widget(".ff.path.to.widget"); # and tie perl variable to Tcl variable and it is # configured to be displayed on GUI my $labtext; tie $labtext, 'Tcl::Var', $int, "labtext"; # for example $button->configure( -command=> sub { print "Hey, man, you just pressed the button\n"; $labtext = "indeed, that man pressed the button"; }); $int->MainLoop;