#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11126974 use warnings; use Tk; my $fakebox; my $oldstatus = ''; my $vertical = 0; my $mw = MainWindow->new; $mw->geometry( '+500+600' ); $mw->Button( -text => 'Exit', -command => sub {$mw->destroy}, -font => 'courierbold 24')->pack; $mw->after( 1, \&checker ); MainLoop; sub checker { my $new = localtime(); # replace localtime with your scraper results if( $new ne $oldstatus ) { $fakebox and $fakebox->destroy; $fakebox = $mw->Toplevel(); $fakebox->title( 'Message Box' ); # really fake it :) $fakebox->geometry( '+300+' . (300, 400)[$vertical ^= 1] ); $fakebox->Label( -text => ' Notice ', -font => 'times 24', -fg => 'white', -bg => 'red3' )->pack; $fakebox->Label( -text => $new, -font => 'times 24' )->pack; $oldstatus = $new; } $mw->after( 3000, \&checker ); }