#!/usr/local/bin/perl use Tk; my $mw = new MainWindow; $mw->geometry( "300x300" ); my $label = $mw -> Label(-text=>"Hello World") -> pack(); my $button = $mw -> Button(-text => "Show", -command => sub { showmessage(); }) -> pack(); MainLoop; sub showmessage{ $mw->messageBox (-message=>"The glossary has been merged", -icon=> 'info'); }