How do I present an open folder selection dialog in Perl?
问题 How do I open folder selection dialog in Perl? 回答1: Depends on the GUI system you're using, and perhaps the platform. For example, on Windows and using Win32::GUI , you can use GetOpenFileName : # $main is your main window... $my_file = $main->GetOpenFileName( -title => 'Select a file...', -file => 'default.file', ); 回答2: Most portable (at least compared to others): use Tk; my $dir = Tk::MainWindow->new->chooseDirectory; Of course, if you're actually using Tk in the rest of your program, you