#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; my $c = $mw->Canvas( -width => 500, -height => 500, -background =>'blue', -scrollregion =>[0, 0, 100, 100]); $c->pack; $c->createRectangle(100, 100, 150, 150, -fill => 'yellow'); MainLoop;