#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::ProgressBar; my $mw = MainWindow->new(); $mw->overrideredirect(1); $mw->geometry('-0-0'); my $p = $mw->ProgressBar( -blocks => 1, -width => 20, -length => 200, -from => 0, -to => 100, -variable => \( my $foo ), -colors => [0,'hotpink'], )->pack(); $foo = 0; $mw->repeat( 10, sub { $foo = ( $foo + 1 ) % 100 } ); MainLoop;