#!/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;