#!/usr/bin/perl use Tk; use Tk::DirSelect; use strict; use warnings; my $main = new MainWindow(); my $ds = $main->DirSelect( -title => 'Ordner wählen', -width => 60, -height => 50); my $btn = $main->Button( -text => 'Durchsuchen', -command => sub { print $ds->Show('.'); exit;} )->pack(); MainLoop;