Zeichenflächenelement
•#!/usr/bin/perl
•use strict;
•use warnings;
•use Tk;
•my $mw = MainWindow->new();
•
•my $c1 = $mw->Canvas(-width  => '350',
•                     -height => '350',
•                    )
•              ->pack();
•
•$c1->createLine( 25, 175, 325, 175,
•                -arrow => 'last', );
•$c1->createText( 335, 175,
•                -fill  => 'blue',
•                -text  => 'X', );
•$c1->createLine(175, 325, 175,  25,
•                -arrow => 'last', );
•$c1->createText(175,  15,
•                -fill  => 'darkgreen',
•                -text => 'Y',
•               );
•
•MainLoop();