use Tk; use strict; my %info = (); my $mw = MainWindow->new; $mw->title("Data Entry"); my $f = $mw->Frame->pack(-side => 'bottom'); $f->Button(-text => "Exit", -command => sub { exit; })->pack(-side => 'left'); $f->Button(-text => "Save", -command => sub { # do something with %info; })->pack(-side => 'bottom'); foreach (qw/Name Address City State Zip Phone Occupation Company Business_Address Business_Phone/) { $f->Entry(-width => 20, -textvariable => \$info{$_})->pack; } MainLoop;