#!/usr/bin/env perl use strict; use warnings; use Tk; my $mw = MainWindow->new(); $mw->title("Hello World"); $mw->geometry("600x400"); my $lbl = $mw -> Label(-text=>"Hello World!"); $lbl -> pack(); my @sides=qw/top right bottom left/; for my $i (0..11){ my $btn = $mw->Button(-text=>$i, -width=>10, -height=>3 )->pack(-side=>$sides[$i%4], -fill=>'none', -expand=>0, -anchor=>'center'); } MainLoop;