c:\@Work\Perl\monks>perl -le "use warnings; use strict; ;; use Tk; ;; my $mw = tkinit; $mw->geometry('200x200'); ;; our %MyValues = qw(1 term1 2 term2 3 term3); ;; for my $DBcolumn (1..3) { $mw->Entry( -textvariable => \$MyValues{$DBcolumn}, -justify => 'left', -width => 25, )->pack(-side => 'top', -anchor => 'w'); } ;; my $button1 = $mw->Button( -text => 'Update Values', -command => \&LoadNewValues, )->pack(); ;; my $button2 = $mw->Button( -text => 'Print Out Content', -command => \&PrintOutContent, )->pack(); ;; MainLoop(); ;; sub PrintOutContent { print qq{$MyValues{1} $MyValues{2} $MyValues{3}}; } ;; my $inc_them; sub LoadNewValues { if ($inc_them++) { $MyValues{$_}++ for qw(1 2 3); } else { @MyValues{ qw(1 2 3) } = qw(hallo ok fine); } } " term1 term2 term3 hallo ok fine hallp ol finf hallq om fing