use strict; use Config::IniHash; use Data::Dumper; use Tk; $::cini_global = ReadINI 'config'; my $ref = $::cini_global->{trickle}->{email_template_file}; my $mw = MainWindow->new; $mw->Entry( -width => 40, -textvariable => \$ref )->pack(qw/-expand 1 -fill x/); $mw->Button( -text => "Change", -command => sub { $ref = $mw->getOpenFile(); $::cini_global->{trickle}{email_template_file} = $ref; })->pack; MainLoop;