use Tk; use warnings; use diagnostics; use strict; my $text; my $mw = MainWindow->new; $mw->title("PerlRun"); $mw->Entry(-width => 30, -textvariable, \$text)->pack(-anchor => 'nw', -side => 'top'); $mw->Button(-text => " Run ", -command => \&runprog ) ->pack(-side => 'left', -anchor => 'sw'); $mw->Button(-text => "Done", -command => sub { exit }) ->pack(-side => 'left', -anchor => 'sw'); sub runprog { system($text); } MainLoop;