#!/usr/bin/perl use warnings; use strict; use threads; use threads::shared; use Tk; my %top_hash; share $top_hash{'A'}{'B'}; $top_hash{'A'}{'B'} = 'Original'; my $t = MainWindow->new()->Scrolled('Text')->pack(); my $e = $t->Entry(-textvariable => \$top_hash{'A'}{'B'}); $t->windowCreate('end', -window => $e); $t->insert('end', "\n"); my $timer = $t->after(3000,sub{$top_hash{'A'}{'B'} = 'Changed'}); MainLoop;