use strict; use warnings; use Tk; my $mw = MainWindow->new; my $entry = $mw->Entry(); my $label = $mw->Label(-justify=>'left'); my $but1 = $mw->Button(-text=>"go",-command=>\&go); $but1->place(-x=>10,-y=>10,-width=>50,-height=>20); $entry->place(-x=>10,-y=>40,-width=>50,-height=>20); $label->place(-x=>10,-y=>70,-width=>50,-height=>20); MainLoop; sub go{ my $text = $entry->get; $label->configure(-text=>$text)};