The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/local/bin/perl -w

use Tk;
require Tk::FileDialog;

my $mw = MainWindow->new();


my $fdialog = $mw->FileDialog('Title'=>'Select File',
 				     'CreateFlag' => 0);
$fdialog->configure('Path' => "$ENV{'HOME'}",
                    'FileMask' => '*',
                    'ShowAllFlag' => 'NO',
                    grabflag => 1);

$mw->Button(-text => 'Choose File',
            -command =>
            sub
             {
              my $fname = $fdialog->Show(ChDirFlag => 1,
                                         DisableShowAll => 'YES');
              print "Chose $fname\n";
             })->pack(-side => 'left', -fill => 'y');

$mw->Button(-text => 'Quit',
            -command => [$mw, 'destroy']) ->pack(-side => 'left', -fill => 'y');

MainLoop;