#!/usr/bin/perl -w use strict; use Tk; my $w = MainWindow->new; my $button; $button = $w->Button(-text => "click me", -command => sub { my $mw = $w->Toplevel; # here I need somehow position the $mw over the $button $mw->Label(-text => "hello")->pack(); })->pack; MainLoop;