http://www.perlmonks.org?node_id=523898


in reply to Follow the window?

Yes you certainly can:
#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new; my $button = $mw->Button( -text => "Hello World!", -command => sub{exit} ); $button->configure(-width =>30); $button->pack; $mw->geometry("+100+50"); # +X co-ord +Y co-ord MainLoop;
Note: you can also put WIDTHxHEIGHT before the +x+y if you need to.

Google:perl tk window position would have helped you here...

And you will find more (perhaps prettier) examples. e.g. adapted from here:

use strict; use warnings; use Tk; my $main = MainWindow->new; $main->Label(-text => 'Hello, world!')->pack; $main->Button( -text => 'Quit', -command => [$main => 'destroy'] )->pack; $main->geometry("+100+50"); # +X co-ord +Y co-ord MainLoop;