#!/usr/bin/perl -w use strict; use Tk; my $haupt = new MainWindow; $haupt->Label(-text=> "Datei wird eingelesen")->pack(); my $box=$haupt->Listbox(); $box->pack(); MainLoop(); sub text { open(DATEI,"; close (DATEI); print "$text"; $box->insert('end',"".\&text); }