use Tk; $widget = tkinit (); my $filename = $widget->getOpenFile(); Tk::MainLoop;