#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = tkinit; $mw->geometry("200x300+200+200"); $mw->overrideredirect(1); # set the override-redirect flag $mw->Button( -text => 'Quit', -command => sub { Tk::exit(0) }, )->pack( -side => 'bottom', ); MainLoop; #### #!/usr/bin/perl use Tk; use strict; use warnings; my $top = new MainWindow; keep_on_top($top); MainLoop; sub keep_on_top { my $w = shift; my $toprepeater = $w->repeat(100, sub{ $w->raise }); }