#!/usr/bin/perl -- use strict; use warnings; use Tk qw/ tkinit /; my $mw = Tk::MainWindow->new; my $top = $mw->Frame(qw'-bg red' )->pack(qw/ -expand 1 -fill both -side top /); my $bottom = $mw->Frame(qw'-bg blue' )->pack(qw/ -expand 1 -fill both -side bottom /); my $topleft = $top->Pane(qw'-bg pink' )->pack(qw/ -expand 1 -fill both -side left /); my $topright = $top->Pane(qw'-bg purple' )->pack(qw/ -expand 1 -fill both -side right /); my $botleft = $bottom->Pane(qw'-bg green' )->pack(qw/ -expand 1 -fill both -side left /); my $botright = $bottom->Pane(qw'-bg orange' )->pack(qw/ -expand 1 -fill both -side right /); $mw->MainLoop;