#!/usr/bin/perl -w use strict; use warnings; use Tk; use File::stat; my $dirprefix="/home/ich"; my $mw = MainWindow->new(); my $liste = $mw->ScrlListbox ( -label=>"Listen-Ausgabe" ,-background=>"grey" ,-relief=>"sunken" )->pack(); my $exitButton = $mw->Button( -text=>"Exit", -command=>"exit")->pack(); my $einleseButton = $mw->Button( -text=>"Einlesen" ,-command=>\&fill_in)->pack(); MainLoop; sub fill_in { my $elem; my @allfiles; my $sb; opendir DIR, $dirprefix; @allfiles = sort { -M $a <=> -M $b} readdir DIR; ### hier ist Zeile 32 !!!!! closedir DIR; #foreach $elem (@allfiles) { # $sb = stat($elem); # printf "File %s \t mtime %s\n", $elem, $sb->size; #} $liste->delete(0,"end"); foreach $elem (@allfiles) { #if ( $elem =~ /\.html/ ) { $liste->insert("end",$elem); #print "$elem\n"; #} } }## fill_in