http://qs1969.pair.com?node_id=63775


in reply to Real simple Tk label

I think you are looking for the -textvariable option, and give it a reference to a scalar:

#!/usr/bin/perl -w use strict; use Tk; my $foo = 500; my $mw = MainWindow->new; my $tes = $mw->Label(-textvariable => \$foo); $tes->pack; $mw->repeat(3000,sub{$foo++}); MainLoop(); __END__