#!/usr/bin/perl use Tk; use Tk::JPEG; use Tk::Dialog; my $mw = MainWindow->new; my $c = $mw->Canvas( -tile => $tile, qw/-width 1500 -height 750/); $c->pack(-side => 'left'); $path = $c->Label(-text => "Default Path For Saving Input Files", -font => 'Garamond 10 bold') ->place(-relx => 0.23, -rely => 0.4); $path_text = $c->Entry(-textvariable => \$def_path, -width => 50)->place(-relx => 0.4, -rely => 0.4); $path_button = $c->Button(-text => "Browse", -font => 'Garamond 8 bold', -width => 5, -command => \&browse)->place(-relx => 0.65, -rely => 0.4); MainLoop; sub browse { $def_path = $path_button->chooseDirectory(-title => 'Select directory', -initialdir => '.', -mustexist => 1); }