#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Balloon; my $mw = tkinit; my $msg = 'press to change'; my $b = $mw->Button( -text => 'Power calculation', -command => sub{$msg = $msg . ' again'}, -padx => 10, )->pack( -side => 'top', -anchor => 'center', -pady => 3, ); my $bln = $mw->Balloon( -background => 'LightYellow' ) ->attach( $b, -msg =>\$msg ); MainLoop;