use Tk; use Tk::FileSelect; use Cwd; $top = new MainWindow; $fs = $top->FileSelect(-verify => [qw/-d/]); print $fs->Show; print "\n";