1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Tk;
use Data::Dumper;
$mw = new MainWindow;
foreach (qw/Vorname Nachname Strasse PLZ Ort/) {
$mw->Label(-text => $_)->pack();
$mw->Entry(-textvariable => \$results{$_})->pack();
}
$mw->Button(-text => "Ok",
-command => sub {
foreach (keys %results) {
print "$_: $results{$_}\n"
}
})->pack();
$mw->Button(-text => "Exit", -command => sub { exit } )->pack();
MainLoop();
Tk benutzt Windows-Codepage (1251, oder so) => ungleich DOS