#!/usr/bin/perl -w use strict; use Tk; my $haupt = new MainWindow; my $links=$haupt->Frame(); $links->Label(-text=> "Einlesen:")->pack(); my $eingabe = $links->Entry(); $eingabe->pack(); my $schalter1 = $links->Button(-text => "Einlesen", -command => \&einlesen )->pack; my $rechts=$haupt->Frame(); $rechts->Label(-text=> "Ausgabe:")->pack(); my $daten = $rechts->Listbox(); $daten->pack(); my $schalter2 = $rechts->Button(-text => "Ausgabe", -command => \&ausgabe )->pack; $links ->pack (-side => "left"); $rechts ->pack (-side =>"right"); MainLoop(); sub einlesen { open(DATEI,"insert('end', "".$neueintrag ); close (daten.txt) }