use warnings; use strict; use Tk::DirSelect; my $main = MainWindow->new (); my $ds = $main->DirSelect(); my $dir = $ds->Show('.'); print $dir;