use strict; use warnings; use Tk; use Tk::StatusBar; my $mw = new MainWindow; my $Label1 = "Welcome to the statusbar"; my $Label2 = "On"; my $Progress = 0; my $sb = $mw->StatusBar(); $sb->addLabel( -relief => 'flat', -textvariable => \$Label1, ); my $p = $sb->addProgressBar( -length => 60, -from => 0, -to => 100, -variable => \$Progress, ); $mw->repeat('50', sub { $Progress = 0 if (++$Progress > 100); }); MainLoop();