#!/usr/bin/perl -w use Tk; $mw = MainWindow->new; $mw->Label( -text => "Hello, World!" )->pack; $mw->Button( -text => "Exit", -command => sub { exit } )->pack; MainLoop;