#!/usr/bin/perl -w use strict; use Tk; use Tk::HList; use Tk::ItemStyle; use Cwd; my $mw = MainWindow->new(); $mw->geometry("400x600"); chdir ".."; my $cwd = getcwd; my $hlist = $mw->HList(-columns=>2,-itemtype => 'text', -command=>sub{&doppelklick;} )->pack(-expand=>1, -fill=>'both'); &neues_verzeichnis($cwd); MainLoop; sub doppelklick{ my $path = join "\n", $hlist->infoSelection(); my $cwd = getcwd; chdir "$cwd/$path"; $cwd = getcwd; print "\n$cwd"; &neues_verzeichnis($cwd); } sub neues_verzeichnis{ my @inhalt; opendir(DIR, $_[0]); while (my $tmp = readdir(DIR)) { push(@inhalt,$tmp); }; closedir DIR; $hlist->deleteAll; foreach (sort(@inhalt)) { $hlist->add("$_", -text=>$_); } }