#!/usr/bin/perl use warnings; use strict; use Tk; my $notification = tkinit; $notification->geometry('+400+400'); # here you can put stuff you want to occur when the window closes # like send an email or something #$notification->protocol('WM_DELETE_WINDOW' => sub { }); $notification->overrideredirect(1); # Remove window decorations $notification->Label( -text => 'Your message displayed here for 5 seconds.', -foreground => 'white', -background => 'black', -height => 5 )->pack; $notification->after( 5000, sub{ $notification->exit; } ); MainLoop;