#!/usr/bin/perl -w use strict; use Tk; my $mw = 'MainWindow'->new(); my $cv0 = $mw->Canvas( qw! -background red ! ) ->pack( qw! -fill both -expand 1 ! ); my $cv1 = $mw->Canvas( qw! -background blue ! ) ->pack( qw! -fill both -expand 1 ! ); MainLoop();